Skip to content

Commit

Permalink
Fix "Undefined array key 1" when the property has no doc.
Browse files Browse the repository at this point in the history
  • Loading branch information
hackoh committed Jan 30, 2024
1 parent 1e3fc01 commit f408d34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Base/Objects/ApiObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public static function getPropertyDataType(\ReflectionProperty $property): ?stdC

preg_match('/@var\s+(\w+)(\[])?/', $property->getDocComment(), $matches);

$o->class = $matches[1];
$o->class = isset($matches[1]) ? $matches[1] : null;
$o->isArray = isset($matches[2]);

if ($o->class == null)
Expand Down

0 comments on commit f408d34

Please sign in to comment.