Skip to content

Commit acdb7f8

Browse files
authored
Merge pull request #222 from robertfausk/fix_calling_static_method_when_in_object_context
Prevent call of self::getClient when not in static context
2 parents b807ca9 + 550e5e9 commit acdb7f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PantherTestCaseTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ protected static function createPantherClient(array $options = [], array $kernel
158158
static::bootKernel($kernelOptions);
159159
}
160160

161-
if (\is_callable([self::class, 'getClient'])) {
161+
if (\is_callable([self::class, 'getClient']) && (new \ReflectionMethod(self::class, 'getClient'))->isStatic()) {
162162
return self::getClient(self::$pantherClient);
163163
}
164164

0 commit comments

Comments
 (0)