From 6fbe2d5fa3f65bc6a6573f8d484d3205e2f314d4 Mon Sep 17 00:00:00 2001 From: Dominic Scheirlinck Date: Tue, 16 Jun 2015 15:55:20 +1200 Subject: [PATCH] Don't check for __invoke on non-objects `method_exists` will cause autoloading for strings. Fixes #257 --- src/Configuration/Options.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Configuration/Options.php b/src/Configuration/Options.php index 1bf3f09b..f2fcac60 100644 --- a/src/Configuration/Options.php +++ b/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); }