Hi Andrea,
Good call. The WP_DEBUG setup the highest notification level. That is why accessing empty property is treated as fatal error.
I’m not recommending to user E_ALL report level in fact it can cause some notifications, warning and also error.
Sorry, but it’ll take me 10 times more time to prevent any kind of warnings in WP_DEBUG mode then to develop Advanced Access Manager from scratch.
The easiest solution for you is just go to advanced-access-manager/module/class-module_user.php and replace the function getCurrentUserRole with next code:
function getCurrentUserRole() {
if (is_object($this->data) && isset($this->data->{$this->cap_key})) {
$result = $this->data->{$this->cap_key};
} else {
$result = array();
}
return $result;
}
I will include this code in next release 1.5.
Thanks again for this report.
Regards,
Vasyl