Skip to content
Snippets Groups Projects
Commit 3030101c authored by Jared Hancock's avatar Jared Hancock
Browse files

deploy: Fix incorrect INCLUDE_DIR on php 5.6

parent d75612d4
No related branches found
No related tags found
No related merge requests found
...@@ -196,7 +196,7 @@ class ApiController { ...@@ -196,7 +196,7 @@ class ApiController {
function getRequest($format) { function getRequest($format) {
global $ost; global $ost;
$input = $ost->is_cli()?'php://stdin':'php://input'; $input = osTicket::is_cli()?'php://stdin':'php://input';
if (!($stream = @fopen($input, 'r'))) if (!($stream = @fopen($input, 'r')))
$this->exerr(400, __("Unable to read request body")); $this->exerr(400, __("Unable to read request body"));
......
...@@ -498,7 +498,7 @@ class osTicket { ...@@ -498,7 +498,7 @@ class osTicket {
} }
/* returns true if script is being executed via commandline */ /* returns true if script is being executed via commandline */
function is_cli() { static function is_cli() {
return (!strcasecmp(substr(php_sapi_name(), 0, 3), 'cli') return (!strcasecmp(substr(php_sapi_name(), 0, 3), 'cli')
|| (!isset($_SERVER['REQUEST_METHOD']) && || (!isset($_SERVER['REQUEST_METHOD']) &&
!isset($_SERVER['HTTP_HOST'])) !isset($_SERVER['HTTP_HOST']))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment