• Resolved Matt Lowe

    (@squelch)


    Hi,

    The plugin is marked as requiring PHP 7.0+ but the most recent updates (4.24.5 and 4.24.6) bricked a PHP 7.0 website with the following error:

    PHP Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in /var/www/clients/client123/web123/web/wp-content/plugins/relevanssi/lib/common.php on line 1032

    This is being caused by nullable parameter typing, a feature not introduced until PHP 7.1:

    function relevanssi_is_front_page_id( ?int $post_id = null ): bool {

    I’ve had to remove Relevanssi from the website, as other code on the site doesn’t work on PHP >7.0. Relevanssi needs to either declare support for PHP 7.1+ in its readme.txt, or not use nullable parameter typing.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Relevanssi indeed requires 7.1. I have forgotten to update the PHP requirement in the free version readme; Premium has it right.

    We’re definitely not going back, as 7.0 should not really be used anymore (yes, I know it’s not always that simple).

    Thread Starter Matt Lowe

    (@squelch)

    7.0 should not really be used anymore (yes, I know it’s not always that simple).

    Indeed. You can take a horse to water, but you can’t make a customer invest in moving away from an ancient and broken theme in order to secure their website.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PHP compatibility’ is closed to new replies.