From 3030101c6004c8b9fb9fa261b33f743b905e4eef Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Fri, 18 Sep 2015 11:42:51 -0500 Subject: [PATCH] deploy: Fix incorrect INCLUDE_DIR on php 5.6 --- include/class.api.php | 2 +- include/class.osticket.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/class.api.php b/include/class.api.php index 1a3191af1..86a8320cd 100644 --- a/include/class.api.php +++ b/include/class.api.php @@ -196,7 +196,7 @@ class ApiController { function getRequest($format) { global $ost; - $input = $ost->is_cli()?'php://stdin':'php://input'; + $input = osTicket::is_cli()?'php://stdin':'php://input'; if (!($stream = @fopen($input, 'r'))) $this->exerr(400, __("Unable to read request body")); diff --git a/include/class.osticket.php b/include/class.osticket.php index 782dcfd3c..84796008e 100644 --- a/include/class.osticket.php +++ b/include/class.osticket.php @@ -498,7 +498,7 @@ class osTicket { } /* 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') || (!isset($_SERVER['REQUEST_METHOD']) && !isset($_SERVER['HTTP_HOST'])) -- GitLab