aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2014-05-21 15:30:26 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2014-05-21 15:30:26 +0200
commit7462328eeb1cda5962e8fa24f8aa25c2509e3045 (patch)
tree98822208ecd61d6450b1bca2c4a021a215b32caf
parentee493642a9d7061550e2b14ac714c2cc9d3ef1a9 (diff)
downloadPraspel-7462328eeb1cda5962e8fa24f8aa25c2509e3045.zip
Praspel-7462328eeb1cda5962e8fa24f8aa25c2509e3045.tar.gz
Praspel-7462328eeb1cda5962e8fa24f8aa25c2509e3045.tar.bz2
Extend closure support.
Avoid an issue in the `getAttributeData` method.
-rw-r--r--AssertionChecker/Runtime.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/AssertionChecker/Runtime.php b/AssertionChecker/Runtime.php
index cd70227..0b2f8de 100644
--- a/AssertionChecker/Runtime.php
+++ b/AssertionChecker/Runtime.php
@@ -386,7 +386,11 @@ class Runtime extends AssertionChecker {
protected function getAttributeData ( \Hoa\Core\Consistency\Xcallable $callable ) {
$callback = $callable->getValidCallback();
- $object = $callback[0];
+
+ if($callback instanceof \Closure)
+ return array();
+
+ $object = $callback[0];
if(!is_object($object))
return array();