• Resolved zitrusblau

    (@zitrusblau)


    When using quotes in search terms like “my search term” you get php notices like Use of undefined constant ‘_’ – assumed ‘‘_’’ in /path/to/wp/wp-content/plugins/relevanssi/lib/common.php on line 493

    (WP_DEBUG enabled)

    Affected code is from line 493 to 499.
    Seems like the used quotes for replacing special chars in search phrases are not correct. please use single or double quotes instead. I changed those lines to:

    			$phrase = str_replace('‘', '_', $phrase);
    			$phrase = str_replace('’', '_', $phrase);
    			$phrase = str_replace('‘', '_', $phrase);
    			$phrase = str_replace('”', '_', $phrase);
    			$phrase = str_replace('“', '_', $phrase);
    			$phrase = str_replace('?', '_', $phrase);
    			$phrase = str_replace('′', '_', $phrase);

    Relevanssi 4.0.3
    PHP 7.0.x

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘PHP Notice: Use of undefined constant when using quotes in search term’ is closed to new replies.