0

Our WordPress site is down and displays the error below. We recently freed up some space on our hosting server, so I suspect a plugin has automatically updated. However, I know our WordPress site is a few versions behind, which has caused some incompatibility issues (built-in 2019). Unfortunately, I can't check the exact version without access to the account. Can anyone please help? I am not technically inclined and struggle to find a solution I can execute.

Parse error: syntax error, unexpected '.', expecting '&' or variable (T_VARIABLE) in wp-includes/plugin.php on line 458

Here is the line in question (first one)

function do_action($hook_name, ...$arg)
{
    global $wp_filter, $wp_actions, $wp_current_filter;

    if (!isset($wp_actions[$hook_name])) {
        $wp_actions[$hook_name] = 1;
    } else {
        ++$wp_actions[$hook_name];
    }
}
Karl Hill
  • 12,937
  • 5
  • 58
  • 95
  • What version of PHP are you using? – aynber May 05 '22 at 17:09
  • 2
    From [this page](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-266/) said _The error is referring to the ... token that indicates variable-length argument lists. This feature was added in PHP 5.6, which is the minimum version required to run WordPress._ – vee May 05 '22 at 17:13

0 Answers0