johngodley / search-regex

Search Regex adds a powerful set of search and replace functions to WordPress that go beyond the standard searching capabilities, with full regex support.
https://searchregex.com
GNU General Public License v3.0
32 stars 9 forks source link

Errors with Search Regex when upgrading to PHP 8.0 #117

Closed gcanter closed 2 years ago

gcanter commented 2 years ago

To help track problems please follow this template. If you can provide screenshots then that will help.

Please replace this template with your own details!

We were testing the upgrade for PHP 8.0 and it is giving the following errors. Do you have a patch/fix for this yet?

PHP Parse error: syntax error, unexpected token "::", expecting "(" in /nas/content/live/n1outdoors/wp-content/plugins/search-regex/models/search.php on line 322 3:40 pm PHP Fatal error: Uncaught Error: Call to a member function calculate_totals() on null in /nas/content/live/n1outdoors/wp-content/plugins/woocommerce-woocartpro/common/WooCartFrontendFestiPlugin.php:233\nStack trace:\n#0 /nas/content/live/n1outdoors/wp-includes/class-wp-hook.php(307): WooCartFrontendFestiPlugin->onCalculateCartTotalsAction(Object(WP))\n#1 /nas/content/live/n1outdoors/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(Object(SCHEMA_JSON_LD_Breadcrumbs), Array)\n#2 /nas/content/live/n1outdoors/wp-includes/plugin.php(522): WP_Hook->do_action(Array)\n#3 /nas/content/live/n1outdoors/wp-includes/class-wp.php(771): do_action_ref_array('wp', Array)\n#4 /nas/content/live/n1outdoors/wp-includes/functions. php(1310): WP->main('')\n#5 /nas/content/live/n1outdoors/wp-blog-header.php(16): wp()\n#6 /nas/content/live/n1outdoors/index.php(17): require('/nas/content/li...')\n#7 {main}\n thrown in /nas/content/live/n1outdoors/wp-content/plugins/woocommerce-woocartpro/common/WooCartFrontendFestiPlugin.php on line 233

Explain what you are trying to do. If you want to suggest a new feature then explain what you want it to do

Actual Behavior

I was copying N1outdoors.com to a staging environment at host. It gave these errors.

Steps to reproduce

See above

Environment

Please list your browser, browser version, version of WordPress and Search Regex plugin. Google Chrome; Wordpress version is 5.9.... Search Regex plugin is version 2.4.1

johngodley commented 2 years ago

You can use this version: https://github.com/johngodley/search-regex/releases/tag/3.0-beta