The server keeps returning these errors:
[Mon Jan 25 13:38:14.133045 2021] [php7:warn] [pid 18879] [client 13.66.139.39:26051] PHP Warning: preg_match() expects parameter 2 to be string, array given in /wp-includes/class-simplepie.php on line 2620
if (isset($this->data['headers']['link']) && preg_match('/<([^>]+)>; rel='.preg_quote($rel).'/', $this->data['headers']['link'], $match))
{
return array($match[1]);
}
else if (isset($this->data['links'][$rel]))
{
return $this->data['links'][$rel];
}
return null;
}
Can someone please explain how to fix this? The $this->data['headers']['link']
is causing the error since it's not a string and giving the preg_match an array instead.
question from:
https://stackoverflow.com/questions/65892267/php-warning-preg-match-expects-parameter-2-to-be-string-array-given-in-wp-in 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…