Skip to content

Commit

Permalink
fix: dont pass null to strlen() (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
darthf1 committed Mar 7, 2022
1 parent f9a3e61 commit 2c11878
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Avatar.php
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ protected function getRandomElement($array, $default)
$array = array_values($array);

$name = $this->name;
if (strlen($name) === 0) {
if ($name === null || strlen($name) === 0) {
$name = chr(rand(65, 90));
}

Expand Down

0 comments on commit 2c11878

Please sign in to comment.