From bc0ec335bf5f375b44ea31cf6f2c9a965c0b48d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Bj=C3=B8rnskov?= Date: Wed, 14 Dec 2011 09:22:54 +0100 Subject: [PATCH] change is_a to instanceof --- Request/ParamConverter/ParamConverterManager.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Request/ParamConverter/ParamConverterManager.php b/Request/ParamConverter/ParamConverterManager.php index fd525c74..040c1091 100644 --- a/Request/ParamConverter/ParamConverterManager.php +++ b/Request/ParamConverter/ParamConverterManager.php @@ -41,9 +41,10 @@ public function apply(Request $request, $configurations) foreach ($configurations as $configuration) { // If the value is already an instance of the class we are trying to convert it into - // we should continue as no convertion is required `is_a` was un-deprecated in 5.3 + // we should continue as no convertion is required $value = $request->attributes->get($configuration->getName()); - if (is_object($value) && is_a($value, $configuration->getClass())) { + $className = $configuration->getClass(); + if (is_object($value) && $value instanceof $className) { continue; }