unexpected > T_STRING, expecting T_OLD_FUNCTION or

2020-05-07 08:29发布

问题:

Anything stand out on line 37 or perhaps the way this class constructor is made?

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /dir/public_html/site/wp-content/themes/test/category-images/category-images.php on line 37

class CategoryImagesII extends CategoryImagesII_Plugin
{

protected $error_codes = array(); // LINE 37
protected $error_strings = array();

回答1:

I bet it's PHP 4 acting up, because it does not recognize the PHP 5-only protected keyword.