Skip to content

Commit 74f139e

Browse files
committed
fix: Craft driver to prevent sites breaking when applying security patches to Craft.
Craft errors when the `$_SERVER['argv']` variable is set, so we just need to `unset` it if it's set. More info on the Valet for Mac PR laravel#1516
1 parent 93306c7 commit 74f139e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cli/Valet/Drivers/Specific/CraftValetDriver.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,10 @@ public function frontControllerPath($sitePath, $siteName, $uri) {
208208
$_SERVER['PHP_SELF'] = $scriptName;
209209
$_SERVER['DOCUMENT_ROOT'] = "$sitePath/$frontControllerDirectory";
210210

211+
if (isset($_SERVER['argv'])) {
212+
unset($_SERVER['argv']);
213+
}
214+
211215
return $indexPath;
212216
}
213-
}
217+
}

0 commit comments

Comments
 (0)