8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f4edc25 + caaefe2 commit 8e41741Copy full SHA for 8e41741
src/functions.php
@@ -8,7 +8,9 @@ function resolve($promiseOrValue = null)
8
return $promiseOrValue;
9
}
10
11
- if (method_exists($promiseOrValue, 'then')) {
+ // Check is_object() first to avoid method_exists() triggering
12
+ // class autoloaders if $promiseOrValue is a string.
13
+ if (is_object($promiseOrValue) && method_exists($promiseOrValue, 'then')) {
14
$canceller = null;
15
16
if (method_exists($promiseOrValue, 'cancel')) {
0 commit comments