Explorar o código

Don't check for __invoke on non-objects

`method_exists` will cause autoloading for strings. Fixes #257
Dominic Scheirlinck %!s(int64=10) %!d(string=hai) anos
pai
achega
ce17c5383a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Configuration/Options.php

+ 1 - 1
src/Configuration/Options.php

@@ -100,7 +100,7 @@ class Options implements OptionsInterface
             $value = $this->input[$option];
             unset($this->input[$option]);
 
-            if (method_exists($value, '__invoke')) {
+            if (is_object($value) && method_exists($value, '__invoke')) {
                 $value = $value($this, $option);
             }