We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
WRITEPATH
1 parent e9bb603 commit 9bc61b3Copy full SHA for 9bc61b3
system/Boot.php
@@ -196,7 +196,16 @@ protected static function definePathConstants(Paths $paths): void
196
197
// The path to the writable directory.
198
if (! defined('WRITEPATH')) {
199
- define('WRITEPATH', realpath(rtrim($paths->writableDirectory, '\\/ ')) . DIRECTORY_SEPARATOR);
+ $writePath = realpath(rtrim($paths->writableDirectory, '\\/ '));
200
+
201
+ if ($writePath === false) {
202
+ header('HTTP/1.1 503 Service Unavailable.', true, 503);
203
+ echo 'The WRITEPATH is not set correctly.';
204
205
+ // EXIT_ERROR is not yet defined
206
+ exit(1);
207
+ }
208
+ define('WRITEPATH', $writePath . DIRECTORY_SEPARATOR);
209
}
210
211
// The path to the tests directory
0 commit comments