For Programmers: Free Programming Magazines  


Home > Archive > PHP Mirrors > December 2004 > Undefined variable error









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Undefined variable error
Vincent Gevers

2004-12-27, 8:55 pm

Hi,

as you can see on http://phpweb.allowee.no-ip.com/contact.php
Notice: Undefined variable: functionsjs in /home/phpweb/include/layout.inc on
line 228

this commit diff seems to explain the problem


$last_updated = strftime("%c %Z", $LAST_UPDATED);
$layout_helper = ($PAGE_COLUMNS > 2 ? "</div>" : "");
- $functionsjs = (in_array("functionsjs", $config) ? "\n<script src=\"" .
$_SERVER['STATIC_ROOT'] . '/functions.js" type="text/javascript"></script>' :
'');
+ //$functionsjs = (in_array("functionsjs", $config) ? "\n<script
src=\"" . $_SERVER['STATIC_ROOT'] . '/functions.js"
type="text/javascript"></script>' : '');

print <<<END_FOOTER

@@ -226,7 +226,7 @@
Last updated: {$last_updated}
</div>
</div>{$functionsjs}
^^^^^

$functionsjs is echoed but not defined (anymore)

Regards,
Vincent
Gabor Hojtsy

2004-12-27, 8:55 pm

> as you can see on http://phpweb.allowee.no-ip.com/contact.php
> Notice: Undefined variable: functionsjs in /home/phpweb/include/layout.inc on
> line 228


Thanks, fixed. In case you find more of these type of errors, it would
be nice to fix them. Most of the pages are E_ALL compatible, but all
might not be...

Regards,
Gabor Hojtsy
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com