create-prisma-php-app 4.4.4 → 4.4.5
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 +8 -14
- package/package.json +1 -1
package/dist/bootstrap.php
CHANGED
|
@@ -1019,26 +1019,16 @@ final class Bootstrap extends RuntimeException
|
|
|
1019
1019
|
|
|
1020
1020
|
private static function dispatchMethod(string $call, mixed $args)
|
|
1021
1021
|
{
|
|
1022
|
-
if (!self::isMethodAllowed(
|
|
1023
|
-
strpos($call, '->') !== false
|
|
1024
|
-
? explode('->', $call, 2)[0]
|
|
1025
|
-
: explode('::', $call, 2)[0],
|
|
1026
|
-
strpos($call, '->') !== false
|
|
1027
|
-
? explode('->', $call, 2)[1]
|
|
1028
|
-
: explode('::', $call, 2)[1]
|
|
1029
|
-
)) {
|
|
1030
|
-
return ['success' => false, 'error' => 'Method not callable from client'];
|
|
1031
|
-
}
|
|
1032
|
-
|
|
1033
1022
|
if (strpos($call, '->') !== false) {
|
|
1034
|
-
|
|
1023
|
+
[$requested, $method] = explode('->', $call, 2);
|
|
1035
1024
|
$isStatic = false;
|
|
1036
1025
|
} else {
|
|
1037
|
-
|
|
1026
|
+
[$requested, $method] = explode('::', $call, 2);
|
|
1038
1027
|
$isStatic = true;
|
|
1039
1028
|
}
|
|
1040
1029
|
|
|
1041
1030
|
$class = $requested;
|
|
1031
|
+
|
|
1042
1032
|
if (!class_exists($class)) {
|
|
1043
1033
|
if ($import = self::resolveClassImport($requested)) {
|
|
1044
1034
|
require_once $import['file'];
|
|
@@ -1049,8 +1039,12 @@ final class Bootstrap extends RuntimeException
|
|
|
1049
1039
|
if (!class_exists($class)) {
|
|
1050
1040
|
return ['success' => false, 'error' => "Class '$requested' not found"];
|
|
1051
1041
|
}
|
|
1052
|
-
$attribute = self::getExposedAttribute($class, $method);
|
|
1053
1042
|
|
|
1043
|
+
if (!self::isMethodAllowed($class, $method)) {
|
|
1044
|
+
return ['success' => false, 'error' => 'Method not callable from client'];
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
$attribute = self::getExposedAttribute($class, $method);
|
|
1054
1048
|
if (!$attribute) {
|
|
1055
1049
|
return ['success' => false, 'error' => 'Method not callable from client'];
|
|
1056
1050
|
}
|