Skip to content

Commit a587f51

Browse files
markrandallderickr
authored andcommitted
Fix: Throw on realpath failures on ProjectGlobals (should never happen).
1 parent 06a8051 commit a587f51

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/ProjectGlobals.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ class ProjectGlobals
99
{
1010
public static function getProjectRoot(): string
1111
{
12-
return realpath(__DIR__ . '/../');
12+
return realpath(__DIR__ . '/../')
13+
?: throw new Error('Unable to locate project root');
1314
}
1415

1516
public static function getPublicRoot(): string
1617
{
17-
return realpath(__DIR__ . '/../public') ?: throw new Error('eh');
18+
return realpath(__DIR__ . '/../public')
19+
?: throw new Error('Unable to locate public root');
1820
}
1921
}

0 commit comments

Comments
 (0)