Support » Plugin: Better Search » Fatal error

  • Resolved essmeier

    (@essmeier)


    Updated to 2.2.0 from version 2.11, but the new version won’t activate.

    Received this message:

    Plugin could not be activated because it triggered a fatal error.

    Fatal error: Can’t use function return value in write context in /home/…/wp-content/plugins/better-search/includes/modules/exclusions.php on line 42

    I’ve reverted to 2.11 for now, as it works. Suggestions?

    • This topic was modified 1 year, 8 months ago by essmeier.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Ajay

    (@ajay)

    Can you try changing that line in 2.2.0 to:

    if ( ! empty( $exclude_post_ids ) ) {
    

    Please deactivate 2.11 before you download 2.2.0

    • This reply was modified 1 year, 8 months ago by Ajay.
    • This reply was modified 1 year, 8 months ago by Ajay.

    Changing that line fixed the problem. Thanks for the prompt reply.

    Plugin Author Ajay

    (@ajay)

    Thanks for confirming. I’ll add it to my list of changes for the next version

    Apologies but I don’t understand what needs to change. I just downloaded 2.2.0 and got the crash so I came searching for a fix. In my file line 42 is just a right-brace (}) character. If I replace that with the above line won’t it cause further problems?

    Never mind. I was looking at the better-search.php file. I missed the file name in the error message. It works now. Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Fatal error’ is closed to new replies.