From e0b4198d2bb0fa6879525b76465758cc2eebfcf5 Mon Sep 17 00:00:00 2001 From: Dyan Galih Date: Mon, 8 Jul 2019 01:47:14 +0700 Subject: [PATCH] Add default cast to string --- src/Tools/Lazy.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Tools/Lazy.php b/src/Tools/Lazy.php index 1f7c479..90aa798 100644 --- a/src/Tools/Lazy.php +++ b/src/Tools/Lazy.php @@ -165,6 +165,9 @@ public static function copyFromArray(array $fromArray, object $toClass, int $opt case "boolean": $toClass->$key = (bool)$fromArray[$key];; break; + default : + $toClass->$key = (string)$fromArray[$key]; + break; } }