PHP Warning + Fatal error in PHP errorlog
-
Hi, installed this plugin on 2 blogs last night. This morning, while reviewing the PHP errorlog on the host, found these errors * 100s for both of them. Blogs work fine, but might be worth having a look at the code in this (experimental) plugin… thx
[07-Jun-2024 09:45:13 UTC] PHP Warning: Undefined array key “background_image” in /srv/data/web/vhosts/[domain removed]/htdocs/wp-content/plugins/image-prioritizer/class-image-prioritizer-background-image-styled-tag-visitor.php on line 44
[07-Jun-2024 09:45:13 UTC] PHP Fatal error: Uncaught TypeError: Image_Prioritizer_Tag_Visitor::is_data_url(): Argument #1 ($url) must be of type string, null given, called in /srv/data/web/vhosts/[domain removed]/htdocs/wp-content/plugins/image-prioritizer/class-image-prioritizer-background-image-styled-tag-visitor.php on line 46 and defined in /srv/data/web/vhosts/[domain removed]/htdocs/wp-content/plugins/image-prioritizer/class-image-prioritizer-tag-visitor.php:61
Stack trace:
#0 /srv/data/web/vhosts/[domain removed]/htdocs/wp-content/plugins/image-prioritizer/class-image-prioritizer-background-image-styled-tag-visitor.php(46): Image_Prioritizer_Tag_Visitor->is_data_url()
#1 /srv/data/web/vhosts/[domain removed]/htdocs/wp-content/plugins/optimization-detective/optimization.php(183): Image_Prioritizer_Background_Image_Styled_Tag_Visitor->__invoke()
#2 /srv/data/web/vhosts/[domain removed]/htdocs/wp-includes/class-wp-hook.php(324): od_optimize_template_output_buffer()
#3 /srv/data/web/vhosts/[domain removed]/htdocs/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#4 /srv/data/web/vhosts/[domain removed]/htdocs/wp-content/plugins/optimization-detective/optimization.php(44): apply_filters()
#5 [internal function]: {closure}()
#6 /srv/data/web/vhosts/[domain removed]/htdocs/wp-includes/functions.php(5420): ob_end_flush()
#7 /srv/data/web/vhosts/[domain removed]/htdocs/wp-includes/class-wp-hook.php(324): wp_ob_end_flush_all()
#8 /srv/data/web/vhosts/[domain removed]/htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#9 /srv/data/web/vhosts/[domain removed]/htdocs/wp-includes/plugin.php(517): WP_Hook->do_action()
#10 /srv/data/web/vhosts/[domain removed]/htdocs/wp-includes/load.php(1270): do_action()
#11 [internal function]: shutdown_action_hook()
#12 {main} thrown in /srv/data/web/vhosts/[domain removed]/htdocs/wp-content/plugins/image-prioritizer/class-image-prioritizer-tag-visitor.php on line 61
- You must be logged in to reply to this topic.