1.6a error in deprecated-functions.php

Hello,
There are references to $Image in deprecated-functions.php in 1.6a which need to be changed to $Images

WARNING: Undefined variable $image in /var/www/html/ZenPhoto/zp-core/zp-extensions/deprecated-functions/deprecated-functions.php on line 408

getRandomImages called from zpB_getRandomImages (functions.php [102])

from include (home.php [24])

from include (index.php [9])

from include (index.php [128])

from index.php [80]

These are the changes to deprecated-functions.php

405c405

< $potd = array('day' => time(), 'folder' => $image->getAlbumName(), 'filename' => $image->getName());

      $potd = array('day' => time(), 'folder' => $images->getAlbumName(), 'filename' => $images->getName());

408c408

< return $image;

  return $images;

Ray

Comments

  • acrylian Administrator, Developer
    edited August 2022

    We can fix that but actually you should fix the usage of deprecated function itself and use the recommended replacement instead. The plugin itself will also be deprecated in the final 1.6.

  • I agree but I wanted to try using the zpBootstrap theme but keeping the number of fixes to it to a minimum

  • acrylian Administrator, Developer
    edited August 2022

    I understand. It is deprecated since 1.5.8. At some time it will have to be fixed.

    It should be fixed now.

  • Thank you. I see you have not changed $image to $images in line 405

  • acrylian Administrator, Developer

    Yes, you are right, was a quick fix inbetween just looking at the error line above, with a plain text editor that does not notify on unused vars. Should be fixed now.

  • Thank you again

Sign In or Register to comment.