We have encountered a few cases in which get_query_var( 'sp' ) returns a string, instead of an array. This causes a fatal on line 144 below (line 179 on the nyp modified version):
PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /var/www/wp-content/plugins/searchpress/lib/class-sp-integration.php:179
Replacing the empty check for isset will make sure we guard against that scenario.
We have encountered a few cases in which
get_query_var( 'sp' )
returns a string, instead of an array. This causes a fatal on line 144 below (line 179 on the nyp modified version):Replacing the
empty
check forisset
will make sure we guard against that scenario.Fixes NYP-19074