Skip to content

Commit 3f2ed29

Browse files
einkorotaylorotwell
authored andcommitted
Populate SERVER_ADDR to avoid undefined index notices in WordPress (#77)
1 parent 2497122 commit 3f2ed29

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cli/drivers/WordPressValetDriver.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ public function serves($sitePath, $siteName, $uri)
2525
*/
2626
public function frontControllerPath($sitePath, $siteName, $uri)
2727
{
28-
$_SERVER['PHP_SELF'] = $uri;
28+
$_SERVER['PHP_SELF'] = $uri;
29+
$_SERVER['SERVER_ADDR'] = '127.0.0.1';
2930

3031
return parent::frontControllerPath($sitePath, $siteName, $uri);
3132
}

0 commit comments

Comments
 (0)