Browse Source

Don't check for __invoke on non-objects

`method_exists` will cause autoloading for strings. Fixes #257
Dominic Scheirlinck 10 năm trước cách đây
mục cha
commit
6fbe2d5fa3
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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);
             }