Skip to content

Commit 2c11878

Browse files
authored
fix: dont pass null to strlen() (#134)
1 parent f9a3e61 commit 2c11878

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Avatar.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ protected function getRandomElement($array, $default)
416416
$array = array_values($array);
417417

418418
$name = $this->name;
419-
if (strlen($name) === 0) {
419+
if ($name === null || strlen($name) === 0) {
420420
$name = chr(rand(65, 90));
421421
}
422422

0 commit comments

Comments
 (0)