Skip to content

Commit

Permalink
Add default cast to null
Browse files Browse the repository at this point in the history
Add cast to string
  • Loading branch information
DyanGalih committed Jul 7, 2019
1 parent e0b4198 commit 990e326
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Tools/Lazy.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,12 @@ public static function copyFromArray(array $fromArray, object $toClass, int $opt
case "boolean":
$toClass->$key = (bool)$fromArray[$key];;
break;
default :
case "string" :
$toClass->$key = (string)$fromArray[$key];
break;
default:
$toClass->$key = $fromArray[$key];
break;
}
}

Expand Down

0 comments on commit 990e326

Please sign in to comment.