Skip to content

Commit

Permalink
Bugfix/Fixing PHP8 - method_exists(): Argument #1 ($object_or_class) …
Browse files Browse the repository at this point in the history
…must be of type object|string, bool given (#12)
  • Loading branch information
ItsReddi authored Oct 8, 2023
1 parent 91fe67b commit 3b51964
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Core/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ public function toArray()
$allowed = get_class_vars(get_class($this));
foreach (get_object_vars($this) as $key => $item) {
if (array_key_exists($key, $allowed) && isset($item)) {
$array[constant(strtoupper("CURLOPT_" . $key))] = (method_exists($item, 'build') ? $item->build() : $item);
$array[constant(strtoupper("CURLOPT_" . $key))] = ((is_string($item) || is_object($item)) && method_exists($item, 'build') ? $item->build() : $item);
}
}
return $array;
}
}
}

0 comments on commit 3b51964

Please sign in to comment.