• Resolved cybeardjm

    (@didierjm)


    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

    (@westonruter)

    Thank you very much for reporting! I’ll investigate and should have a fix out by early next week.

    Plugin Author Weston Ruter

    (@westonruter)

    What version of PHP are you using?

    And do you have an example URL on which this error was occurring?

    Thread Starter cybeardjm

    (@didierjm)

    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 4 months, 2 weeks ago by cybeardjm.
    Plugin Author Weston Ruter

    (@westonruter)

    I can clearly see the problem. I opened a pull request to fix and I’ve just pushed out the 0.1.1 version with the fix. Thanks again for reporting!

    Thread Starter cybeardjm

    (@didierjm)

    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)
  • You must be logged in to reply to this topic.