Strict Standards - error message

hi, since a few months ago (my hoster upgraded the server to php5.4) every new post works well but in the homepage shows the following message:
Strict Standards: Only variables should be passed by reference in (...) /zenphoto/zp-core/class-image.php on line 1083

the hoster faq suggested to correct the script, giving this link

I've tried to check the above line but nothing makes sense to me.

I'd rather correct manually the line instead of upgrading the whole zenphoto, as long time ago I've done some custom mods in the core system (e.g. added missing IPTC field which is working fine, nothing to see with this error message)
every new added image shows error message in the homepage, while the image page itself is ok.

Zenphoto versione [8326] (Build ufficiale)
Impostazione lingua corrente: it_IT.UTF8
Tema corrente galleria: kird_zenpage
Versione PHP: 5.4.4-14+deb7u11)

I'm stuck... anybody there can suggest what's wrong and how to avoid the message? thanks in advance!


  • fretzl Administrator, Developer
    Unfortunately it's impossible to tell what could be wrong since you modified the core.
    In the original class-image.php file (from the release) line 1083 cannot possibly cause the error.
  • thanks for your fast reply!
    Imho the error has nothing to do with my mods, which I did at the very beginning, and it has been working fine for hundreds of posts, while now the error went back to the very first post: this means that something which was working now (since the server was updated to php5.4) is not working well anymore...
    I'm happy that you agree with me that that line has nothing to do with the error, I guess it has to do with zenpage -that's why I've posted here- not with zenphoto itself.
  • acrylian Administrator, Developer
    The note (it's not really an error) you now see is because some standards are stricter in newer PHP versions. Maybe after three years you should really consider an upgrade. Now you know why it is not recommended to modify the core … ;-) The current Zenphoto 1.4.6 works up to PHP 5.6.
  • The easiest solution would be to turn off checking strict standards in your error level.
  • I've realized that the notes don't show when I'm logged in admin, they appear again when I log out.
    this might mean that some permissions are asked (with a deprecated syntax) to users?
    @fretzl - the above means maybe is true that line 1083 is causing the error!?
    @acrylian - well, yes, I'm aware that core shouldn't be touched by a common user as I am, but I was forced to find myself a solution to a missing IPTC field output (there are some posts in the forum...)
    @sbillard - as a last chance, I'm trying to follow your suggestion, first from my backend:
    ... zp-core/admin-options.php?page=options&tab=image > in the "Original Image Protection" I've set the option to "unprotected"
    ... zp-core/admin-options.php?page=options&tab=plugin > in the "deprecated-functions" I've unchecked "all"
    appearently nothing has changed...
    is there anything else I can do as admin or is it better to check the hoster's control panel?
  • acrylian Administrator, Developer
    I don't remember about the missing IPTC field sadly. I do have a vast memory about something off the standard definition of metadata.

    If you can point to a topic. Have you looked if that is fix meanwhile?

    Normally you can change error reporting level on your server via htaccess or a php.ini. Depends on the host.
  • use the forum search! ;-)

    meanwhile I'll check the server htaccess
  • acrylian Administrator, Developer
    use the forum search! ;-)
    Hehe ;-) I had a vast memory of that topic indeed and that it was something off the standard. Given that wide investigation by our former colleague I fear there is not much to add …
  • after some (much) efforts and investigations I've done some steps forward. first of all I wasn't able to change the error permissions as @sbillard suggested, but I reconsidered that even if I succeded in that task it was like taking care of the symptoms and not of the disease. however:
    - as I stated in my previous post the error DIDN'T show while I was logged in
    - line 1083 was definitely responsible of the error but in my class-image.php file (
    - this was my function, line 1083 being the last one:
    ` function checkAccess(&$hint=NULL, &$show=NULL) {

    $album = $this->getAlbum();

    if ($album->isMyItem($this->view_rights)) {

    return true;


    return $album->checkforGuest($hint=NULL, $show=NULL);


    therefore I've checked what if I comment the whole function and everything worked fine, error removed.
    then I downloaded the last build and replaced the whole old function checkAccess with the new version.
    I did test intensively -as much I could- but site is now running well showing no errors!
    Being not a coder I'm aware that some other problem could arise, so my question is: having pointed out which was the problem, do you recommend any other step?
  • acrylian Administrator, Developer
    Good that you are aware that copying one function from quite different versions is not encouraged. Sorry, the only other step is an proper upgrade to the current version.
  • well, yes... but what can I do? I'm forced to do so 'cause I'm not standard ;-)
  • acrylian Administrator, Developer
    Well, what can I say try to follow the standards :-)
Sign In or Register to comment.