Skip to content

Commit

Permalink
null safe check
Browse files Browse the repository at this point in the history
  • Loading branch information
jr-k committed Apr 24, 2023
1 parent 4d76c7a commit 75ee423
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Annotation/SelectOption.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function __construct(array $data)

if (is_array($this->options)) {
foreach ($this->options as $key => &$value) {
if (str_contains($value, '::$')) {
if ($value !== null && str_contains($value, '::$')) {
list($className, $propertyName) = explode('::$', $value);
$class = new \ReflectionClass($className);
$value = $class->getStaticPropertyValue($propertyName);
Expand Down

0 comments on commit 75ee423

Please sign in to comment.