static function catchError(&$error) { if (!self::$enabled && self::$lastError !== FALSE) { restore_error_handler(); } $error = self::$lastError; self::$lastError = FALSE; return (bool) $error; }