create-prisma-php-app 3.6.7 → 3.6.8
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 +15 -4
- package/package.json +1 -1
package/dist/bootstrap.php
CHANGED
|
@@ -747,7 +747,11 @@ final class Bootstrap extends RuntimeException
|
|
|
747
747
|
}
|
|
748
748
|
return $res;
|
|
749
749
|
} catch (Throwable $e) {
|
|
750
|
-
|
|
750
|
+
if (isset($_ENV['SHOW_ERRORS']) && $_ENV['SHOW_ERRORS'] === 'false') {
|
|
751
|
+
return ['success' => false, 'error' => 'An error occurred. Please try again later.'];
|
|
752
|
+
} else {
|
|
753
|
+
return ['success' => false, 'error' => "Function error: {$e->getMessage()}"];
|
|
754
|
+
}
|
|
751
755
|
}
|
|
752
756
|
}
|
|
753
757
|
return ['success' => false, 'error' => 'Invalid callback'];
|
|
@@ -784,10 +788,13 @@ final class Bootstrap extends RuntimeException
|
|
|
784
788
|
if ($res !== null) {
|
|
785
789
|
return ['success' => true, 'error' => null, 'response' => $res];
|
|
786
790
|
}
|
|
787
|
-
|
|
788
791
|
return $res;
|
|
789
792
|
} catch (Throwable $e) {
|
|
790
|
-
|
|
793
|
+
if (isset($_ENV['SHOW_ERRORS']) && $_ENV['SHOW_ERRORS'] === 'false') {
|
|
794
|
+
return ['success' => false, 'error' => 'An error occurred. Please try again later.'];
|
|
795
|
+
} else {
|
|
796
|
+
return ['success' => false, 'error' => "Instance call error: {$e->getMessage()}"];
|
|
797
|
+
}
|
|
791
798
|
}
|
|
792
799
|
} else {
|
|
793
800
|
if (!class_exists($class) || !is_callable([$class, $method])) {
|
|
@@ -800,7 +807,11 @@ final class Bootstrap extends RuntimeException
|
|
|
800
807
|
}
|
|
801
808
|
return $res;
|
|
802
809
|
} catch (Throwable $e) {
|
|
803
|
-
|
|
810
|
+
if (isset($_ENV['SHOW_ERRORS']) && $_ENV['SHOW_ERRORS'] === 'false') {
|
|
811
|
+
return ['success' => false, 'error' => 'An error occurred. Please try again later.'];
|
|
812
|
+
} else {
|
|
813
|
+
return ['success' => false, 'error' => "Static call error: {$e->getMessage()}"];
|
|
814
|
+
}
|
|
804
815
|
}
|
|
805
816
|
}
|
|
806
817
|
|