Keyword
Please note that official support for commercial extensions & templates is provided in the Subscriber Help Desk.
Support requests should ONLY be directed there and require an active subscription plan.
This forum board is to be used for archive purposes and knowledge exchange ONLY.

Notice: Undefined variable: gd_support

  • sven wittoeck
  • sven wittoeck's Avatar Topic Author
  • Offline
  • New Member
More
16 years 8 months ago - 16 years 8 months ago #13100 by sven wittoeck
Notice: Undefined variable: gd_support was created by sven wittoeck
Hi,

I did a search on this but it seems uncovered yet.
We installed gd2 graphic lib on the server.

But the front end stil ends up with the following error:

Notice: Undefined variable: gd_support in C:\web\vrijdag.be\wwwroot\fotoshop\plugins\content\jwsigpro.php on line 100

you can check it live on www.vrijdag.be/fotoshop


any suggestions?

thnx

drag

edit: the images seem to open on the bottom of the page though.

Please Log in or Create an account to join the conversation.

  • sven wittoeck
  • sven wittoeck's Avatar Topic Author
  • Offline
  • New Member
More
16 years 8 months ago #13101 by sven wittoeck
Replied by sven wittoeck on topic Re: Notice: Undefined variable: gd_support
I erased that part in the code and it seems to work fine :-|

Please Log in or Create an account to join the conversation.

  • JoomlaWorks Support Team
  • JoomlaWorks Support Team's Avatar
  • Offline
  • Platinum Member
More
16 years 8 months ago - 15 years 11 months ago #13102 by JoomlaWorks Support Team
Replied by JoomlaWorks Support Team on topic Re: Notice: Undefined variable: gd_support
At line 75 of the plugin just change the
if(!function_exists("gd_info")) {
to
if(function_exists("gd_info")) {

Thank you

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
15 years 11 months ago #13103 by munchdes
Replied by munchdes on topic Re: Notice: Undefined variable: gd_support
I am getting the same error on the standard version (not the pro version):
Notice: Undefined variable: gd_support in .../oldnellynew.com.au/www/plugins/content/jwsig.php on line 83

Code on line 83 is:
if(count($gd_support)) {
foreach ($gdsupport as $k=>$v) {echo $v;}

Running Joomla! 1.5.9
The component is functioning reasonably well, I have a small layout issue but it may be completely unrelated. Any resolution for the error displayed would be great?

Luke

Please Log in or Create an account to join the conversation.

  • JoomlaWorks Support Team
  • JoomlaWorks Support Team's Avatar
  • Offline
  • Platinum Member
More
15 years 11 months ago #13104 by JoomlaWorks Support Team
Replied by JoomlaWorks Support Team on topic Re: Notice: Undefined variable: gd_support
Hi!

In the code, between the lines 74 to 86, can you see the follow code?
// GD2 Library Check
if(function_exists("gd_info")) {
   $gdinfo = gd_info();
   $gdsupport = array();
   $version = intval(ereg_replace('[[:alpha:][:space:]()]+', '', $gdinfo['GD Version']));
   if($version!=2) $gdsupport[] = '<div class="message">'._SIGPRO_GD_LIBMISSING.'</div>';
   if (!$gdinfo['JPG Support']) $gdsupport[] = '<div class="message">'._SIGPRO_GD_LIBNOJPG.'</div>';
   if (!$gdinfo['GIF Create Support']) $gdsupport[] = '<div class="message">'._SIGPRO_GD_LIBNOGIF.'</div>';
   if (!$gdinfo['PNG Support']) $gdsupport[] = '<div class="message">'._SIGPRO_GD_LIBNOPNG.'</div>';
   if(count($gd_support)) {
	foreach ($gdsupport as $k=>$v) {echo $v;}
   }
}
It's strange because the $gd_support is initialized at line 77
Let's try this

Change
if(count($gd_support)) {
	foreach ($gdsupport as $k=>$v) {echo $v;}
}
to
if(isset($gd_support) && count($gd_support)) {
	foreach ($gdsupport as $k=>$v) {echo $v;}
}

Thank you!

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
15 years 11 months ago #13105 by munchdes
Replied by munchdes on topic Re: Notice: Undefined variable: gd_support
Fixed!

Perfect, thanks very much!

Luke

Please Log in or Create an account to join the conversation.

More
15 years 10 months ago #13106 by Mario
Replied by Mario on topic Re: Notice: Undefined variable: gd_support

It's strange because the $gd_support is initialized at line 77
Let's try this

Change

if(count($gd_support)) {
	foreach ($gdsupport as $k=>$v) {echo $v;}
}
to
if(isset($gd_support) && count($gd_support)) {
	foreach ($gdsupport as $k=>$v) {echo $v;}
}

Thank you!


Hi,
no $gd_support isn't initialized, but $gdsupport is (note the underscore)

Your isset solution won't really help, since there's no $gd_support the if() can't possibly be true regardless of GD2 working or not.

It's simply a typo, try to change
if(count($gd_support)) {

to
if(count($gdsupport)) {

and it should work as expected.

Cheers, Mario

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum