mirror of
https://github.com/predis/predis.git
synced 2026-08-25 16:39:41 +00:00
Don't check for __invoke on non-objects
`method_exists` will cause autoloading for strings. Fixes #257
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user