Skip to content

Commit

Permalink
check array dfault
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Jan 11, 2024
1 parent cfc6e41 commit 095ce0c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ReflectionProperty.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function __toString()
$this->__initialize();
$defaultValue = $this->getDefaultValue();
if (is_string($defaultValue)) {
if (strlen($defaultValue, 18)) {
if (strlen($defaultValue) > 18) {
$defaultValue = substr($defaultValue, 0, 15) . '...';
}

Expand All @@ -130,7 +130,9 @@ public function __toString()
$defaultValue = "NULL";
}

$defaultValueDisplay = '= ' . $defaultValue;
if (! is_array($defaultValue)) {
$defaultValueDisplay = '= ' . $defaultValue;
}
}

return sprintf(
Expand Down

0 comments on commit 095ce0c

Please sign in to comment.