From 03d3112f5b8f7d397aad6b6f9bd20cdb1161e406 Mon Sep 17 00:00:00 2001 From: Oguzhan Uysal Date: Fri, 29 Jan 2016 10:40:23 +0100 Subject: [PATCH] [BUGFIX][PHP7] thrown TypeError not catched PHP7 introduced the Error (throwable) class, which acts like Exceptions but it doesn't have any relation with the Exception base class. try-catch blocks which only catch exceptions needs to be updated to work with this new base class --- Security/Authorization/Voter/ArticleVoter.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Security/Authorization/Voter/ArticleVoter.php b/Security/Authorization/Voter/ArticleVoter.php index b29f997..e55c782 100644 --- a/Security/Authorization/Voter/ArticleVoter.php +++ b/Security/Authorization/Voter/ArticleVoter.php @@ -49,6 +49,10 @@ public function supportsClass($class) { return false; } + catch(\Error $e) + { + return false; + } }