create-prisma-php-app 4.5.1-beta → 4.6.1-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bootstrap.php
CHANGED
|
@@ -611,7 +611,25 @@ final class Bootstrap extends RuntimeException
|
|
|
611
611
|
|
|
612
612
|
private static function convertToArrayObject($data)
|
|
613
613
|
{
|
|
614
|
-
|
|
614
|
+
if (!is_array($data)) {
|
|
615
|
+
return $data;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
if (empty($data)) {
|
|
619
|
+
return $data;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
$isAssoc = array_keys($data) !== range(0, count($data) - 1);
|
|
623
|
+
|
|
624
|
+
if ($isAssoc) {
|
|
625
|
+
$obj = new stdClass();
|
|
626
|
+
foreach ($data as $key => $value) {
|
|
627
|
+
$obj->$key = self::convertToArrayObject($value);
|
|
628
|
+
}
|
|
629
|
+
return $obj;
|
|
630
|
+
} else {
|
|
631
|
+
return array_map([self::class, 'convertToArrayObject'], $data);
|
|
632
|
+
}
|
|
615
633
|
}
|
|
616
634
|
|
|
617
635
|
public static function wireCallback(): void
|