Use of undefined constant silent in heading.php after 1.2.5 upgrade

Hello,

I have upgraded my local zenphoto album from 1.2.3 to 1.2.5.
On my local wordpress 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

Comments

  • acrylian Administrator, Developer
    Try `newImage(...)` instead of `new Image()`. The testing-dev theme is quite outdated.
  • pled Member
    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 ?
  • 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.
  • acrylian Administrator, Developer
  • pled Member
    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
Sign In or Register to comment.