• After upgrading to 3.57, I’m seeing errors when updating a gallery with the ‘Scan folder for new images button’. A partial stack trace:

    [12-Jan-2024 15:56:01 UTC] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /www/www.example.com/wordpress/wp-content/plugins/nextgen-gallery/src/DataStorage/Manager.php:2292
    Stack trace:
    #0 /www/www.example.com/wordpress/wp-content/plugins/nextgen-gallery/src/Legacy/admin/functions.php(206): Imagely\NGG\DataStorage\Manager->generate_image_size()
    #1 /www/www.example.com/wordpress/wp-content/plugins/nextgen-gallery/src/Legacy/admin/functions.php(304): nggAdmin::rotate_image()

    That line 2292 looks like this:

    $image->meta_data[ $size ] = $size_meta;

    From debug logging I added, it appears that sometimes, $image->meta_data is an empty string at this point, rather than the array it should be, so it seems that the property is not properly initialized in some cases. Adding the following just before line 2292 seems to fix the problem:

    if ( empty( $image->meta_data ) || ! is_array( $image->meta_data ) ) {    $image->meta_data = [];
    }

    Regards,

    Martijn.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Mihai Ceban

    (@mihaiimagely)

    Hi @tinuzz,

    I am sorry to hear of the problem, and thanks for reporting it. Our developers will take care of it.

    I’ll keep you posted here in case of any news from them.

    Thanks

    Plugin Support Mihai Ceban

    (@mihaiimagely)

    Hi @tinuzz,

    I hope you’re doing well!

    I am happy to inform you that the issue that you’ve reported here has been solved in NextGen Gallery 3.58 version.
    ?
    We appreciate your patience here while our dev team has worked on a fix! Please feel free to let me know if you have any questions.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatal error with ‘scan folder for new images’ with 3.57’ is closed to new replies.