Change WordPress user roles and capabilities › Forums › Bug Reports › Syntax error, unexpected '[' in other-roles-access.php on line 364 › Reply To: Syntax error, unexpected '[' in other-roles-access.php on line 364
04/01/2018 at 02:55
#4538
Vladimir
Keymaster
Hi Cinzia,
Yes, it’s related to the PHP version.
Workaround: replace noted line 364 with this code:
if (is_array($caps) & count($caps)>0) {
$caps_val = array_values($caps);
$cap = $caps_val[0];
} else {
$cap = $caps;
}
I will include this change to the next update.
Pay a serious attention that even version 5.5 does not receive the security updates already: http://php.net/supported-versions.php