1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-08 09:10:10 +01:00

Update CraftValetDriver.php

When applying https://github.com/craftcms/security-patches to a Craft project, the fix for [CVE-2024-56145](https://github.com/advisories/GHSA-2p6p-9rc9-62j9) breaks sites served by Valet (and Herd). 

This fix allows these sites to work when using Valet (and Herd).
This commit is contained in:
Austin Drummond
2025-05-01 21:59:37 -04:00
committed by GitHub
parent 66b7d43080
commit ba2d5727ed

View File

@@ -193,6 +193,10 @@ public function frontControllerPath(string $sitePath, string $siteName, string $
$_SERVER['PHP_SELF'] = $scriptName;
$_SERVER['DOCUMENT_ROOT'] = $sitePath.'/'.$frontControllerDirectory;
if (isset($_SERVER['argv'])) {
unset($_SERVER['argv']);
}
return $indexPath;
}
}