- Fixed notifications if included in projects running in command-line where certain variables aren't available.

This commit is contained in:
Simon Sessingø
2016-05-01 00:02:42 +02:00
parent f98e5ac59d
commit 1a9351c690
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -22,9 +22,9 @@ class Request {
public function __construct() {
$this->data = array();
$this->host = $_SERVER['HTTP_HOST'];
$this->uri = $_SERVER['REQUEST_URI'];
$this->method = (isset($_POST['_method'])) ? strtolower($_POST['_method']) : strtolower($_SERVER['REQUEST_METHOD']);
$this->host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : array();
$this->uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : array();
$this->method = (isset($_POST['_method'])) ? strtolower($_POST['_method']) : (isset($_SERVER['REQUEST_METHOD']) ? strtolower($_SERVER['REQUEST_METHOD']) : array());
$this->headers = $this->getAllHeaders();
$this->input = new Input();
}