In simplesamlPHP library there is code
Logger::maskErrors(E_ALL);
$hidden = in_array(
self::$HIDE_FROM_DISCOVERY,
$metadata['EntityAttributes'][self::$ENTITY_CATEGORY],
true
);
Logger::popErrorMask();
So instead of use isset($metadata['EntityAttributes'][self::$ENTITY_CATEGORY])
they decided to set error reporting to 0, and then restore it. The problem is that when I run it as a script it works, but when I plug it to the framework it still fails with error at that point.
Although I dumped level there and it was really set to 0.
Also I've heard that if you have set a user defined error handler function, then error_reporting() settings are completely ignored. But global search returns no set_error_handler in project.