• Resolved rmmoul

    (@rmmoul)


    We noticed that we were unable to save changes to the widget settings recently and saw that trying to save the widget settings was causing the below error to be thrown when the plugin tries to call:

    $default_thumbnail_sizes = $recently_image->get_image_sizes();

    In the /recently/src/Widget/Widget.php file on line 359.

    I’ve also noticed that when this widget is in a sidebar that any widgets placed below it are not output but I’ll need to do some more testing in a staging environment to rule out a conflict being caused by other plugins or the theme for that specific issue.

    Here is the error from our error log:

    PHP Fatal error: Uncaught Error: Call to a member function get_image_sizes() on null in /nas/content/live/xxxxxxxxx/wp-content/plugins/recently/src/Widget/Widget.php:359\nStack trace:\n#0 /nas/content/live/xxxxxxxxx/wp-includes/class-wp-widget.php(443): Recently\\Widget\\Widget->update(Array, Array)\n#1 /nas/content/live/xxxxxxxxx/wp-admin/includes/ajax-actions.php(2346): WP_Widget->update_callback(Array)\n#2 /nas/content/live/xxxxxxxxx/wp-includes/class-wp-hook.php(292): wp_ajax_save_widget('')\n#3 /nas/content/live/xxxxxxxxx/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array)\n#4 /nas/content/live/xxxxxxxxx/wp-includes/plugin.php(484): WP_Hook->do_action(Array)\n#5 /nas/content/live/xxxxxxxxx/wp-admin/admin-ajax.php(187): do_action('wp_ajax_save-wi...')\n#6 {main}\n thrown in /nas/content/live/xxxxxxxxx/wp-content/plugins/recently/src/Widget/Widget.php on line 359, referer: https://www.xxxxxxxxx.org/wp-admin/widgets.php

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi @rmmoul,

    Thanks for the heads up, I was able to reproduce the issue. Cannot release a new update with a fix yet though because I’m waiting for feedback on other fixes/changes so for the time being please follow these instructions:

    1. Go to Plugins > Plugin Editor and select Recently using the dropdown at the right of your screen.
    2. Click on src/Widget/Widget.php to edit this file.
    3. Find this line of code: $default_thumbnail_sizes = $recently_image->get_image_sizes(); (around line 359) and change it to $default_thumbnail_sizes = $this->image->get_sizes();
    4. Scroll down and click on Update File to save changes.
    Plugin Author Hector Cabrera

    (@hcabrera)

    … or you can use the Github version which already has this fix in it (plus other changes): https://github.com/cabrerahector/recently

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatal error call to get_image_sizes()’ is closed to new replies.