Within minutes of updating to PHP7.4 the following PHP notice appeared in my error log multiple times (possibly over 100):
[30-Jul-2020 15:04:07 UTC] PHP Notice: Trying to access array offset on value of type bool in /home/tsnetwork/public_html/wp-content/plugins/woocommerce-views/Class_WooCommerce_Views.php on line 1746
This also appeared:
[30-Jul-2020 15:17:52 UTC] PHP Warning: strpos(): Empty needle in /home/tsnetwork/public_html/wp-includes/plugin.php on line 687
[30-Jul-2020 15:17:53 UTC] PHP Notice: Trying to access array offset on value of type bool in /home/tsnetwork/public_html/wp-content/plugins/woocommerce-views/Class_WooCommerce_Views.php on line 1745
[30-Jul-2020 15:17:53 UTC] PHP Notice: Trying to access array offset on value of type bool in /home/tsnetwork/public_html/wp-content/plugins/woocommerce-views/Class_WooCommerce_Views.php on line 1746
[30-Jul-2020 15:17:53 UTC] PHP Warning: strpos(): Empty needle in /home/tsnetwork/public_html/wp-includes/plugin.php on line 687
[30-Jul-2020 15:17:53 UTC] PHP Warning: require(/home/tsnetwork/public_html/wp-content/plugins/woocommerce-views/inc/wcviews-blocks.php): failed to open stream: No such file or directory in /home/tsnetwork/public_html/wp-content/plugins/woocommerce-views/views-woocommerce.php on line 93
[30-Jul-2020 15:17:53 UTC] PHP Fatal error: require(): Failed opening required '/home/tsnetwork/public_html/wp-content/plugins/woocommerce-views/inc/wcviews-blocks.php' (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/tsnetwork/public_html/wp-content/plugins/woocommerce-views/views-woocommerce.php on line 93
[30-Jul-2020 15:17:53 UTC] PHP Notice: Trying to access array offset on value of type bool in /home/tsnetwork/public_html/wp-includes/class-wp-recovery-mode-email-service.php on line 339
[30-Jul-2020 15:17:53 UTC] PHP Notice: Trying to access array offset on value of type bool in /home/tsnetwork/public_html/wp-includes/class-wp-recovery-mode-email-service.php on line 340
[30-Jul-2020 15:17:53 UTC] PHP Warning: strpos(): Empty needle in /home/tsnetwork/public_html/wp-includes/plugin.php on line 687
I have not yet had time to see if this has any noticeable impact on functionality.
Please can you let me know if this is cause to downgrade my PHP version?
I have had to deactivate WooCommerce Views and return to PHP7.2 to prevent this slowing my site while it is fixed. Please let me know if you require access to debug so that I can reactivate the Plugin and PHP 7.4 when you need.
Site speed has stabilised so I have returned to PHP 7.4, though I still get the following error many many times:
[30-Jul-2020 15:04:07 UTC] PHP Notice: Trying to access array offset on value of type bool in /home/tsnetwork/public_html/wp-content/plugins/woocommerce-views/Class_WooCommerce_Views.php on line 1746
Hello,
The problem you mentioned above is abnormal, please check these:
1) Make sure you are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/
2) In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2020, deactivate all custom codes, and test again
3) Also check if there is any PHP/JS error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/
4) If the problem still persists, please provide database dump file(ZIP file) of your website, you can put the package files in your own google drive disk, share the link only, also point out the problem page URL and view URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/
Thanks for the details, I can install your database dump file in my localhost.
In the debug logs you provided above, there is a PHP error:
[30-Jul-2020 15:17:53 UTC] PHP Fatal error: require(): Failed opening required '/home/tsnetwork/public_html/wp-content/plugins/woocommerce-views/inc/wcviews-blocks.php' (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/tsnetwork/public_html/wp-content/plugins/woocommerce-views/views-woocommerce.php on line 93
That means the "Toolset WooCommerce Blocks" plugin file is broken in your website.
Please try these in your website:
1) Backup your website database,
2) Delete and reinstall the Toolset WooCommerce Blocks plugin, you can download it here:
https://toolset.com/account/downloads/
3) Dashboard-> Toolset-> Woocommerce Views:
Choose the options you want, then "Save all Settings", and test again.
It should be able reset all "Toolset WooCommerce Blocks" plugin settings, and resolve the PHP notice problem.
It works fine in my localhost.
Hi Luo,
That's fixed this issue and another with the same plugin that I had been experiencing.
Thank You for your help!