WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery
[resolved] Warning on album page after upgrade to PHP 5.4.0 (23 posts)

  1. vodim
    Member
    Posted 2 years ago #

    Hi Alex and all,
    I have problem on album page http://www.por-ninos-de-ecuador.cz/fotogalerie/ after upgrade to PHP Version 5.4.0 Warning: Creating default object from empty value in /pub/pnindewa/por-ninos-de-ecuador.cz/web/www/wp-content/plugins/nextgen-gallery/nggfunctions.php on line 553

    I change
    $galleries[$key]->counter = 0;
    to
    @$galleries[$key]->counter = 0;
    Is not a solution, but at least not yet displayed the error.

    Thanks for help...

    Server:
    Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/1.0.0-fips DAV/2
    PHP/5.4.0 mod_fcgid/2.3.6
    MYSQL v5.5.21

    WordPressu 3.3.1
    NextGEN Gallery 1.9.3
    Firefox

    http://wordpress.org/extend/plugins/nextgen-gallery/

  2. wernergetzmann
    Member
    Posted 2 years ago #

    Hi Vodim. Thank you for the trick. Perhaps there is no solution, but it works fine. http://www.mensday-drei-thermen.eu/fotos

  3. biziclop
    Member
    Posted 2 years ago #

    I inserted a line at line 513:

    // re-order them and populate some
        foreach ($sortorder as $key) {
            if (!isset($galleries[$key]))  $galleries[$key] = new stdclass; // this is the new line
  4. diynamic
    Member
    Posted 1 year ago #

    Thanks biziclop, this solution works for me. Cheers

  5. Atulo
    Member
    Posted 1 year ago #

    You can also just turn error reporting off. I put in...
    error_reporting(0);
    ...on line 2.

  6. FaffeF
    Member
    Posted 1 year ago #

    Would be nice to get this fixed in the next release, so the update doesn't overwrite the manual fix.

  7. wernergetzmann
    Member
    Posted 1 year ago #

    thx biziclop,

    insert a line at line 513:
    if (!isset($galleries[$key])) $galleries[$key] = new stdclass;
    works fine.

    // re-order them and populate some
    foreach ($sortorder as $key) {
    if (!isset($galleries[$key])) $galleries[$key] = new stdclass; // this is the new line

  8. ritch47golf
    Member
    Posted 1 year ago #

    Thanks bizclop and wernergetzmann

    the simple insertion worked for me.

    if (!isset($galleries[$key])) $galleries[$key] = new stdclass;

  9. wernergetzmann
    Member
    Posted 1 year ago #

    Crap. With the new version of Nextgen does not work anymore.
    Does anyone have a new idea?

  10. groan
    Member
    Posted 1 year ago #

    I'm also having this problem. Will this still work?
    error_reporting(0);

  11. wernergetzmann
    Member
    Posted 1 year ago #

    Now I have just turned off the screen errors in php.ini. (display_errors = Off). That's it.

  12. groan
    Member
    Posted 1 year ago #

    Now my images aren't showing. But that's another problem I guess.

  13. Renaud
    Member
    Posted 1 year ago #

    Hello,

    I still have this problem with my galleries http://telliers.fr/photos/

    Warning: Creating default object from empty value in /homepages/32/d316530274/htdocs/telliers_wordpress/wp-content/plugins/nextgen-gallery/nggfunctions.php on line 553

    is displayed 7 times (corresponding to number of galleries displayed in the 2 albums shown).

    Here is my configuration:

    Système d'exploitation : Linux (32 Bit)
    Serveur : Apache
    Mémoire utilisée : 16.59Mega octets
    Version MySql : 5.0.96-log
    Mode SQL : Non configuré
    Version PHP : 5.4.9
    PHP Safe Mode : Non
    PHP autorise les URL fopen : Oui
    PHP mémoire maxi : 90
    PHP taille max. de téléchargement : 40M
    PHP taille max. du billet : 8M
    Limite de PCRE Backtracking : 500000
    PHP durée max. d'exécution du script : 50000s
    Support PHP Exif : Oui ( V1.4 )
    Support PHP IPTC : Oui
    Support de PHP XML : Oui
    Bibliothèque graphique

    GD Version : bundled (2.0.34 compatible)
    FreeType Support : Oui
    FreeType Linkage : with freetype
    T1Lib Support : Non
    GIF Read Support : Oui
    GIF Create Support : Oui
    JPEG Support : Oui
    PNG Support : Oui
    WBMP Support : Oui
    XPM Support : Non
    XBM Support : Oui
    JIS-mapped Japanese Font Support : Non

    My website host recently updated to php 5.4 and I updated Nextgen gallery to latest (1.9.9)

    May someone be nice and confirm that line should be inserted in nggfunctions.php file or another ? !
    May someone also indicate me an editor for code that counts lines as I couldn't find correct location to inseret code.

    simple questions for advanced persons but not for the beginner I am

    thanks in advance.

    R

  14. photocrati
    Member
    Plugin Author

    Posted 1 year ago #

    Hey everyone,

    We just released v1.9.10 that should resolve this error.

  15. FaffeF
    Member
    Posted 1 year ago #

    Fuck, I just upgraded the plugin based on that advice, and now I have to revert again. It's still not PHP 5.4 compatible it seems.

    Just a lot of Warning: Creating default object from empty value in /.../public_html/wp/wp-content/plugins/nextgen-gallery/nggfunctions.php on line 554

  16. FaffeF
    Member
    Posted 1 year ago #

    Still, the line 513 fix above seems to fix it for me. So I didn't need to restore from backup. Still, it would be nice to get this commited to trunk.

  17. wernergetzmann
    Member
    Posted 1 year ago #

    @photcrati Unfortunately, that's not true. 1.9.10 does not fix the error. Also not with PHP 5.4.9. The only thing that helps is to edit php.ini (display_errors = Off).
    Please look for the error and test the plugin with display error switched on. Thanks a lot.

  18. Wesam Alalem
    Member
    Posted 1 year ago #

    Still see the warning even after upgrading to 1.9.10. In my case it shows only in the Album view. please fix it guys.

  19. Wesam Alalem
    Member
    Posted 1 year ago #

    Quick solution: In the file nggfunctions.php I have commented lines 553 to 556, as they look repeated from the lines 521 to 523. Now works fine, waiting for the official fix.

  20. J_Walker
    Member
    Posted 1 year ago #

    @photocrati: 1.9.10 does not fix the issue for me. I still see the error on album pages like Wesam mentioned.

    Also, none of my sub-albums show up under the main album, the album page is just blank. Got rid of the warnings with the fixes posted above, but there's nothing under my albums now, just blank. What a mistake it was to install that update.

  21. J_Walker
    Member
    Posted 1 year ago #

    Jetpack was causing the blank albums. Deactivated it and now everything is working again.

  22. tigermendoza
    Member
    Posted 1 year ago #

    Yep, was still getting the error after updating but deactivating jetpack seems to have fixed the problem for me as well.

  23. wernergetzmann
    Member
    Posted 1 year ago #

    @ Wesam
    Great, comment out line 553 to 557 and it runs again.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic