create-prisma-php-app 1.8.6 → 1.8.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.
@@ -6,6 +6,10 @@ class Validator
6
6
  {
7
7
  public static function validateString($value)
8
8
  {
9
+ if ($value === null) {
10
+ return '';
11
+ }
12
+
9
13
  return htmlspecialchars(trim($value), ENT_QUOTES, 'UTF-8');
10
14
  }
11
15
 
@@ -1,11 +1,5 @@
1
1
  <?php
2
2
 
3
- namespace App\Api;
4
-
5
- require_once __DIR__ . "/../../../bootstrap.php";
6
-
7
- use Lib\Prisma\Classes\Prisma;
8
-
9
3
  // CORS headers
10
4
  header('Access-Control-Allow-Origin: *');
11
5
  header('Access-Control-Allow-Methods: POST, OPTIONS');
@@ -24,6 +18,11 @@ if ($_SERVER["REQUEST_METHOD"] !== "POST" || empty($_SERVER["HTTP_X_REQUESTED_WI
24
18
  exit;
25
19
  }
26
20
 
21
+ require_once __DIR__ . "/../../../settings/paths.php";
22
+ require_once __DIR__ . "/../../../vendor/autoload.php";
23
+
24
+ use Lib\Prisma\Classes\Prisma;
25
+
27
26
  // Initialize variables
28
27
  $className = $methodName = $paramsJson = "";
29
28
  $params = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma-php-app",
3
- "version": "1.8.6",
3
+ "version": "1.8.8",
4
4
  "description": "Prisma-PHP: A Revolutionary Library Bridging PHP with Prisma ORM",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",