create-prisma-php-app 1.21.3 → 1.21.4

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.
Files changed (2) hide show
  1. package/dist/bootstrap.php +13 -11
  2. package/package.json +1 -1
@@ -672,18 +672,20 @@ try {
672
672
  }
673
673
 
674
674
  $filePath = APP_PATH . '/' . $uri;
675
- if (file_exists($filePath) && (!$_fileToInclude === 'route.php' || !$_fileToInclude === 'index.php')) {
676
- // Check if the file is a PHP file
677
- if (pathinfo($filePath, PATHINFO_EXTENSION) === 'php') {
678
- // Include the PHP file without setting the JSON header
679
- include $filePath;
680
- } else {
681
- // Set the appropriate content-type for non-PHP files if needed
682
- // and read the content
683
- header('Content-Type: ' . mime_content_type($filePath)); // Dynamic content type
684
- readfile($filePath);
675
+ if (is_file($filePath)) {
676
+ if (file_exists($filePath)) {
677
+ // Check if the file is a PHP file
678
+ if (pathinfo($filePath, PATHINFO_EXTENSION) === 'php') {
679
+ // Include the PHP file without setting the JSON header
680
+ include $filePath;
681
+ } else {
682
+ // Set the appropriate content-type for non-PHP files if needed
683
+ // and read the content
684
+ header('Content-Type: ' . mime_content_type($filePath)); // Dynamic content type
685
+ readfile($filePath);
686
+ }
687
+ exit;
685
688
  }
686
- exit;
687
689
  } else if ($_prismaPHPSettings['backendOnly']) {
688
690
  // Set the header and output a JSON response for file not found
689
691
  header('Content-Type: application/json');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma-php-app",
3
- "version": "1.21.3",
3
+ "version": "1.21.4",
4
4
  "description": "Prisma-PHP: A Revolutionary Library Bridging PHP with Prisma ORM",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",