From 721e4123bbaeb499023bde4c94c5a39cc603d0d7 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Mon, 9 Dec 2013 17:14:04 -0600 Subject: [PATCH] lint: Fix E_STRICT warnings Fixes #262 --- bootstrap.php | 2 +- include/class.osticket.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bootstrap.php b/bootstrap.php index d5e15e680..93f1161c0 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -2,7 +2,7 @@ class Bootstrap { - function init() { + static function init() { #Disable Globals if enabled....before loading config info if(ini_get('register_globals')) { ini_set('register_globals',0); diff --git a/include/class.osticket.php b/include/class.osticket.php index 875dc13bf..41fe2f20d 100644 --- a/include/class.osticket.php +++ b/include/class.osticket.php @@ -362,8 +362,7 @@ class osTicket { return null; } - /* static */ - function get_root_path($dir) { + static function get_root_path($dir) { /* If run from the commandline, DOCUMENT_ROOT will not be set. It is * also likely that the ROOT_PATH will not be necessary, so don't @@ -394,7 +393,8 @@ class osTicket { * the osTicket installation. That is removed from SCRIPT_NAME. * What's left is the ROOT_PATH. */ - $frame = array_pop(debug_backtrace(false)); + $bt = debug_backtrace(false); + $frame = array_pop($bt); $file = str_replace('\\','/', $frame['file']); $path = substr($file, strlen(ROOT_DIR)); if($path && ($pos=strpos($_SERVER['SCRIPT_NAME'], $path))!==false) -- GitLab