• Resolved cfm168

    (@cfm168)


    Hello, I have WP6.1.1. and Twenty Eleven v4.2. Get this error log every day recently:

    [Jan 14, 08:51:30] PHP Warning: Undefined array key “width” in /home/SorryHided/SorryHided.com/wp-content/themes/twentyeleven/image.php on line 39
    [Jan 14, 08:51:30] PHP Warning: Undefined array key “height” in /home/SorryHided/SorryHided.com/wp-content/themes/twentyeleven/image.php on line 40
    [Jan 14, 08:58:14] PHP Warning: Undefined array key “width” in /home/SorryHided/SorryHided.com/wp-content/themes/twentyeleven/image.php on line 39
    [Jan 14, 08:58:14] PHP Warning: Undefined array key “height” in /home/SorryHided/SorryHided.com/wp-content/themes/twentyeleven/image.php on line 40
    [Jan 14, 09:15:10] PHP Warning: Attempt to read property “ID” on null in /home/SorryHided/SorryHided.com/wp-includes/link-template.php on line 405

    Please help to fix it. Thanks in advance!

Viewing 15 replies - 16 through 30 (of 34 total)
  • Moderator Kathryn Presner

    (@zoonini)

    I just tested again using the Debug Bar plugin and I’m seeing one error:

    ( ! ) Error: Call to undefined function nocache_headers() in /Users/REDACTED/app/public/wp-admin/admin.php on line 36

    I’m going to investigate further, but since you’re still seeing more errors than I am, please still do the conflict testing I suggested and let me know how it goes.

    Moderator Kathryn Presner

    (@zoonini)

    Alright, I tested again on a fresh install with the following:

    • Debug Bar 1.1.4 plugin active and debugging turned on in wp-config.php
    • No other plugins active
    • PHP 8.0.22
    • Twenty Eleven 4.2

    I’m not seeing any errors at all this time.

    Let me know how it goes on your end.

    Thread Starter cfm168

    (@cfm168)

    I am asking Debug Bar plugin support and waiting reply from them.

    I can see I already have define( ‘WP_DEBUG’, false ); in my wp-config.php. If I add again and turn on it will cause any conflict?

    Thread Starter cfm168

    (@cfm168)

    @zoonini – I installed the Debug Bar and turned my existing the ‘WP_DEBUG’, true’. 

    I don’t see the error like yours, but I can see 5 warnings and 1 notice report from the Debug. By the way I can see some Deprecated notices on top of my site for public:

    Deprecated: Return type of Requests_Cookie_Jar::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/SorryHided/SorryHided.com/wp-includes/Requests/Cookie/Jar.php on line 63
    
    Deprecated: Return type of Requests_Cookie_Jar::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/SorryHided/SorryHided.com/wp-includes/Requests/Cookie/Jar.php on line 73
    
    Deprecated: Return type of Requests_Cookie_Jar::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/SorryHided/SorryHided.com/wp-includes/Requests/Cookie/Jar.php on line 89
    
    Deprecated: Return type of Requests_Cookie_Jar::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/SorryHided/SorryHided.com/wp-includes/Requests/Cookie/Jar.php on line 102
    
    Deprecated: Return type of Requests_Cookie_Jar::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/SorryHided/SorryHided.com/wp-includes/Requests/Cookie/Jar.php on line 111
    
    Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/SorryHided/SorryHided.com/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 40
    
    Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/SorryHided/SorryHided.com/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 51
    
    Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/SorryHided/SorryHided.com/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 68
    
    Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/SorryHided/SorryHided.com/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 82
    
    Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/SorryHided/SorryHided.com/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 91
    
    SorryHidedy.com/wp-content/plugins/woo-conditional-product-fees-for-checkout/includes/class-woocommerce-conditional-product-fees-for-checkout.php:160) in /home/SorryHided/SorryHided.com/wp-content/plugins/docket-cache/includes/src/Plugin.php on line 1183
    
    SorryHidedy.com/wp-content/plugins/woo-conditional-product-fees-for-checkout/includes/class-woocommerce-conditional-product-fees-for-checkout.php:160) in /home/SorryHided/SorryHided.com/wp-content/plugins/wp-cloudflare-page-cache/libs/cache_controller.class.php on line 556
    
    SorryHidedy.com/wp-content/plugins/woo-conditional-product-fees-for-checkout/includes/class-woocommerce-conditional-product-fees-for-checkout.php:160) in /home/SorryHided/SorryHided.com/wp-content/plugins/wp-cloudflare-page-cache/libs/cache_controller.class.php on line 557
    Moderator Kathryn Presner

    (@zoonini)

    Hi @cfm168 – I see that some of the errors above are a PHP incompatibility issue with a WooCommerce extension, which you’ve already reported to the plugin devs.

    Could you please re-test whether there are still any errors with all your plugins temporarily deactivated? As mentioned earlier, you can use the Health Check plugin‘s troubleshooting mode if you don’t want to change your live site.

    Thread Starter cfm168

    (@cfm168)

    Hi @zoonini,

    Still get these php error log:

    [Mar 09, 20:55:28] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /home/SorryHided/SorryHided.com/wp-includes/media.php:779
    Stack trace:
    image_get_intermediate_size(312, Array) /home/SorryHided/SorryHided.com/wp-includes/media.php:234
    image_downsize(312, Array) /home/SorryHided/SorryHided.com/wp-includes/media.php:954
    wp_get_attachment_image_src(312, Array, false) /home/SorryHided/SorryHided.com/wp-includes/media.php:1032
    wp_get_attachment_image(312, Array) /home/SorryHided/SorryHided.com/wp-content/themes/twentyeleven/image.php:104
    include(‘/home/xxx…’) /home/SorryHided/SorryHided.com/wp-includes/template-loader.php:106
    require_once(‘/home/xxx…’) /home/SorryHided/SorryHided.com/wp-blog-header.php:19
    require(‘/home/xxx…’) /home/SorryHided/SorryHided.com/index.php:17
    {main}
    thrown in /home/SorryHided/SorryHided.com/wp-includes/media.php on line 779
    [Mar 09, 20:56:58] PHP Warning: Attempt to read property “ID” on null in /home/SorryHided/SorryHided.com/wp-includes/link-template.php on line 405

    I still try to find the conflict by Debug Bar.

    Could you please re-test whether there are still any errors with all your plugins temporarily deactivated?

    Hi @cfm168 did you manage to test while your plugins are temporarily deactivated as zoonini mentioned?

    Thread Starter cfm168

    (@cfm168)

    @thelmachido – Thank you for your advise. Temporarily deactivate all plugins will causes my live site loose business. I have to wait 1 day for each plugin to get error log report if it is good one. I have more than 20 plugins so I will loose 20 days business.

    Moderator Kathryn Presner

    (@zoonini)

    @cfm168 as I’ve explained earlier, using the Health Check plugin temporarily deactivates plugins only for your own logged-in session. This tool does not deactivate plugins on your live site or for anyone else.

    Thread Starter cfm168

    (@cfm168)

    @zoonini – Thank you for your explanation again. I just understand temporarily deactivates plugins no effect to my live site by using the Health Check plugin. I will delete the Debug Bar plugin and use the Health Check plugin instead. Will let you know. Thank you!

    Thread Starter cfm168

    (@cfm168)

    Moderator Kathryn Presner

    (@zoonini)

    Hi @cfm168 – when you click the Troubleshooting link that looks like this:

    …could you please provide a screenshot of the page you arrive at?

    Clicking “Troubleshoot” is supposed to bring you to page that looks like the following. It sounds like you’re seeing something else, and I’d like to better understand what it is.

    Thread Starter cfm168

    (@cfm168)

    Hi @zoonini,

    Yes I have the same as yours:

    https://ibb.co/1Zrx7YR

    https://ibb.co/m57xpH3

    What should I do next to find the conflict?

    Moderator Kathryn Presner

    (@zoonini)

    OK great! So what the plugin does is temporarily deactivate your plugins. When you look at the Plugins page in Troubleshooting mode, you should see no plugins active except for Health Check.

    While in this mode, check the areas of your site where you were seeing those PHP errors earlier to see if they are still present or not.

    If they are no longer present, activate your plugins one-by-one while still in Troubleshooting mode. Recheck your site in between each reactivation to see if the errors come back. If they come back, then you know the problem is with the last plugin you reactivated.

    Once you’ve found the culprit, you can turn off Troubleshooting mode.

    There’s a full guide here on how to do this as well.

    Let me know how it goes!

    Thread Starter cfm168

    (@cfm168)

    There are no Deactivate option for plugins after enabled troubleshooting mode.

    https://ibb.co/wzbQ9Td

Viewing 15 replies - 16 through 30 (of 34 total)
  • The topic ‘PHP error’ is closed to new replies.