ZenphotoCMS Forum
Use of undefined constant silent in heading.php after 1.2.5 upgrade - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Use of undefined constant silent in heading.php after 1.2.5 upgrade (/thread-5331.html)



Use of undefined constant silent in heading.php after 1.2.5 upgrade - pled - 2009-06-13

Hello,

I have upgraded my local zenphoto album from 1.2.3 to 1.2.5.
On my local [b]wordpress[/b] blog, I use a heading.php file to display a random banner taken from the album.
The content of the heading.php file was provided here :
http://www.zenphoto.org/support/topic.php?id=2639
and works fine.

After upgrade, I get the following message (note the random image is displayed) :

Notice: Use of undefined constant silent - assumed 'silent' in /var/www/wordpress/zenphoto/themes/testing-dev/heading.php on line 4

The line 4 and next are like below :

`

if (is_null($randomImage) || checkforPassword(silent)) {

$randomImage= new Image(new Album(new Gallery(), ''), 'zen-logo.jpg' );

}

`

Should I change something in the heading.php because of version 1.2.5 ? I would like to fix this before upgrading the on-line album.

Thanks and regards,
pled




Use of undefined constant silent in heading.php after 1.2.5 upgrade - acrylian - 2009-06-13

Try newImage(...) instead of new Image(). The testing-dev theme is quite outdated.




Use of undefined constant silent in heading.php after 1.2.5 upgrade - pled - 2009-06-13

acrylian,

Tried, but same message. Tried with Effervescence theme, and I still get the same.

Seems more related to usage of checkforPassword(silent), isn't it ?
Should silent be defined ? As I access zenphoto from wordpress, through heading.php file ?




Use of undefined constant silent in heading.php after 1.2.5 upgrade - sbillard - 2009-06-13

The error is in the lines you quote above. silent is apparently not defined. Anyway, you should probably just pass true as the parameter. Not much sense in defining silent=true. You still should use the newImage() function as acrylian notes.




Use of undefined constant silent in heading.php after 1.2.5 upgrade - acrylian - 2009-06-13

Probably a typo as $silent is the parameter to pass:
http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functioncheckforPassword




Use of undefined constant silent in heading.php after 1.2.5 upgrade - pled - 2009-06-14

perfect : using 'true' as the parameter solves the problem. Lines are now :

`

if (is_null($randomImage) || checkforPassword(true)) {

$randomImage= newImage(new Album(new Gallery(), ''), 'zen-logo.jpg' );

}

`

Thank you for your great support.
pled