Skip to content

Commit aea79d6

Browse files
committed
Fix file_exists warning when resolving with long strings
1 parent f4edc25 commit aea79d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function resolve($promiseOrValue = null)
88
return $promiseOrValue;
99
}
1010

11-
if (method_exists($promiseOrValue, 'then')) {
11+
if (is_object($promiseOrValue) && method_exists($promiseOrValue, 'then')) {
1212
$canceller = null;
1313

1414
if (method_exists($promiseOrValue, 'cancel')) {

0 commit comments

Comments
 (0)