• Resolved Dipankar Pal

    (@dipankarpal212)


    I am getting a fatal error on PHP 8.2 WP 6.6.1. Can you please look into the error below and let me know whats causing the issue.

    Fatal error: Uncaught TypeError: Unsupported operand types: string * string in /home/html/wp-includes/media.php:5923 Stack trace: #0 /home/html/wp-includes/widgets/class-wp-widget-media-image.php(250): wp_get_loading_optimization_attributes(‘img’, Array, ‘widget_media_im…’) #1 /home/html/wp-includes/widgets/class-wp-widget-media.php(257): WP_Widget_Media_Image->render_media(Array) #2 /home/html/wp-includes/class-wp-widget.php(394): WP_Widget_Media->widget(Array, Array) #3 /home/html/wp-content/plugins/megamenu/classes/widget-manager.class.php(891): WP_Widget->display_callback(Array, Array) #4 /home/html/wp-content/plugins/megamenu/megamenu.php(725): Mega_Menu_Widget_Manager->show_widget(‘media_image-8’) #5 /home/html/wp-includes/class-wp-hook.php(324): Mega_Menu->add_widgets_to_menu(Array, Object(stdClass)) #6 /home/html/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array) #7 /home/html/wp-includes/nav-menu-template.php(234): apply_filters(‘wp_nav_menu_obj…’, Array, Object(stdClass)) #8 /home/html/wp-content/themes/pw-theme-understrap/header.php(186): wp_nav_menu(Object(stdClass)) #9 /home/html/wp-includes/template.php(810): require_once(‘/chroot/home/de…’) #10 /home/html/wp-includes/template.php(745): load_template(‘/chroot/home/de…’, true, Array) #11 /home/html/wp-includes/general-template.php(48): locate_template(Array, true, true, Array) #12 /home/html/wp-content/themes/pw-theme-understrap/template-home-blocks.php(13): get_header() #13 /home/html/wp-includes/template-loader.php(106): include(‘/chroot/home/de…’) #14 /home/html/wp-blog-header.php(19): require_once(‘/chroot/home/de…’) #15 /home/html/index.php(17): require(‘/chroot/home/de…’) #16 {main} thrown in /home/html/wp-includes/media.php on line 5923

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author megamenu

    (@megamenu)

    Hi,

    That looks like a bug related to one of the core image widgets which has been added to the menu. I suspect you have entered the width and height of one of the widges as ‘123px’ instead of ‘123’ and this is causing problems in later versions of php. Please check the image widget settings.

    Regards,

    Tom

    Thread Starter Dipankar Pal

    (@dipankarpal212)

    Hello Thank you for your reply. But i dont find any such settings to adjust width and height.

    I have ‘display settings’ in image ‘edit screen’ on the widget page, where i can adjust dimention throigh a dropdown. Like this. Could you please guide me where exactly i can find the things that you told before.

    wp-admin/widgets.php > Max Mega Meni Widgets > images

    • This reply was modified 7 months, 4 weeks ago by Dipankar Pal.
    Plugin Author megamenu

    (@megamenu)

    Hi,

    Please check if you have custom sizes specified for any image widget here: https://app.screencast.com/uXJFxtFvvM8YJ (this is just a guess as to what is causing the problem).

    It is “media_image-8” that is causing the problem, if you install the Classic Widgets plugin and inspect the widgets, you should be able to find it like this: https://app.screencast.com/sTOp961ExVYkl

    Regards,
    Tom

    Thread Starter Dipankar Pal

    (@dipankarpal212)

    So I have checked all the images. None of it has a custom size.

    Thread Starter Dipankar Pal

    (@dipankarpal212)

    Also I dont have ‘Classic Widgets plugin’ installed.

    Thread Starter Dipankar Pal

    (@dipankarpal212)

    Though i didnt find any custom size, one image was loading very slowly in the widget.php. So i removed that image and the original issue gone. Thanks Tom for your efforts.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Fatal error on PHP Version: 8.2.20 WP 6.6.1’ is closed to new replies.