Support » Plugin: Relevanssi - A Better Search » Exact Phrases Issue

  • Resolved Robert Noakes

    (@rnoakes3rd)


    Good Morning,

    I started getting a weird error, but I’m not sure if it’s related to your plugin or an incompatibility with another plugin:

    PHP Fatal error:  Uncaught TypeError: Argument 1 passed to relevanssi_extract_phrases() must be of the type string, null given, called in /nas/content/live/###/wp-content/plugins/relevanssi/lib/common.php on line 532 and defined in /nas/content/live/###/wp-content/plugins/relevanssi/lib/phrases.php:21
    Stack trace:
    #0 /nas/content/live/###/wp-content/plugins/relevanssi/lib/common.php(532): relevanssi_extract_phrases(NULL)
    #1 /nas/content/live/###/wp-content/plugins/relevanssi/lib/indexing.php(1281): relevanssi_tokenize(NULL, true, 2)
    #2 /nas/content/live/###/wp-content/plugins/relevanssi/lib/indexing.php(547): relevanssi_index_custom_fields(Array, 9189, Array, '2', false)
    #3 /nas/content/live/###/wp-content/plugins/relevanssi/lib/indexing.php(342): relevanssi_index_doc('9189', false, 'visible', true)
    #4 /nas/content/live/###/wp-content/plugins/relevanssi/lib/admin-ajax.php(62): relevanssi_build_index(true, false, 20, true)
    #5 /nas/content/live/### in /nas/content/live/###/wp-content/plugins/relevanssi/lib/phrases.php on line 21, referer: https://###/wp-admin/options-general.php?page=relevanssi%2Frelevanssi.php&tab=indexing

    I was able to resolve the issue by adding the following code to the top of the relevansii_token function:

    $string = (is_null($string)) ? '' : $string;

    I don’t need an answer on this one, but I use your plugin a lot and wanted to make sure you were aware of this issue, just in case.

    Thank you,
    @rnoakes3rd

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.