Title: PHP Warning + Fatal error in PHP errorlog
Last modified: June 7, 2024

---

# PHP Warning + Fatal error in PHP errorlog

 *  Resolved [cybeardjm](https://wordpress.org/support/users/didierjm/)
 * (@didierjm)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/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

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/php-warning-fatal-error-in-php-errorlog/#post-17809814)
 * Thank you very much for reporting! I’ll investigate and should have a fix out
   by early next week.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/php-warning-fatal-error-in-php-errorlog/#post-17809826)
 * What version of PHP are you using?
 * And do you have an example URL on which this error was occurring?
 *  Thread Starter [cybeardjm](https://wordpress.org/support/users/didierjm/)
 * (@didierjm)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/php-warning-fatal-error-in-php-errorlog/#post-17810061)
 * Hi,
 * PHP version: 8.3.6 (Supports 64bit values)
 * There’s no specific URL to point to as the error shows. My blogs are www . didiermary.
   fr & amf . didiermary.fr. Overnight these errors both generated an increase of
   the size of my PHP errorlog of more than 4MB (it grew from 5MB to 9MB after I
   installed the plugin on both and I inspect it regularly for other errors around
   Webmention or ActivityPub). So I’d say probably, the errors appeared each time
   a page was called directly by a visitor or by the refresh of the cache…
 * Sincerely
   DJM
    -  This reply was modified 1 year, 11 months ago by [cybeardjm](https://wordpress.org/support/users/didierjm/).
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/php-warning-fatal-error-in-php-errorlog/#post-17810103)
 * I can clearly see the problem. I opened a [pull request](https://github.com/WordPress/performance/pull/1288)
   to fix and I’ve just pushed out the 0.1.1 version with the fix. Thanks again 
   for reporting!
 *  Thread Starter [cybeardjm](https://wordpress.org/support/users/didierjm/)
 * (@didierjm)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/php-warning-fatal-error-in-php-errorlog/#post-17810107)
 * You’re welcome/
 * Updated already on both. Will check tomorrow what’s in my PHP errorlog.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘PHP Warning + Fatal error in PHP errorlog’ is closed to new replies.

 * ![](https://ps.w.org/image-prioritizer/assets/icon.svg?rev=3099535)
 * [Image Prioritizer](https://wordpress.org/plugins/image-prioritizer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/image-prioritizer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/image-prioritizer/)
 * [Active Topics](https://wordpress.org/support/plugin/image-prioritizer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/image-prioritizer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/image-prioritizer/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [cybeardjm](https://wordpress.org/support/users/didierjm/)
 * Last activity: [1 year, 11 months ago](https://wordpress.org/support/topic/php-warning-fatal-error-in-php-errorlog/#post-17810107)
 * Status: resolved