Skip to content

Commit 232ecb3

Browse files
committed
instanceof triggers must not be accessed before initialization error
1 parent daa581a commit 232ecb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Optimole.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public static function __callStatic($name, $arguments)
7676
{
7777
$method = sprintf('create%s', ucfirst($name));
7878

79-
if (!self::$instance instanceof self) {
79+
if (!isset(self::$instance)) {
8080
throw new RuntimeException('Please initialize the Optimole SDK first.');
8181
} elseif (!method_exists(self::class, $method)) {
8282
throw new BadMethodCallException(sprintf('No factory method for "%s" exists.', $name));

0 commit comments

Comments
 (0)