Skip to content

Commit

Permalink
fix: calling class_exists with null in Google\Model (#2405)
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Granados committed Mar 17, 2023
1 parent 895749d commit 5ed4edc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Model.php
Expand Up @@ -294,7 +294,7 @@ protected function keyType($key)
$keyType = $key . "Type";

// ensure keyType is a valid class
if (property_exists($this, $keyType) && class_exists($this->$keyType)) {
if (property_exists($this, $keyType) && $this->$keyType !== null && class_exists($this->$keyType)) {
return $this->$keyType;
}
}
Expand Down

0 comments on commit 5ed4edc

Please sign in to comment.