Skip to content
Snippets Groups Projects
Commit e7510cba authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #267 from greezybacon/issue/262


lint: Fix E_STRICT warnings

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents 8ee35dc9 721e4123
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
class Bootstrap { class Bootstrap {
function init() { static function init() {
#Disable Globals if enabled....before loading config info #Disable Globals if enabled....before loading config info
if(ini_get('register_globals')) { if(ini_get('register_globals')) {
ini_set('register_globals',0); ini_set('register_globals',0);
......
...@@ -362,8 +362,7 @@ class osTicket { ...@@ -362,8 +362,7 @@ class osTicket {
return null; return null;
} }
/* static */ static function get_root_path($dir) {
function get_root_path($dir) {
/* If run from the commandline, DOCUMENT_ROOT will not be set. It is /* 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 * also likely that the ROOT_PATH will not be necessary, so don't
...@@ -394,7 +393,8 @@ class osTicket { ...@@ -394,7 +393,8 @@ class osTicket {
* the osTicket installation. That is removed from SCRIPT_NAME. * the osTicket installation. That is removed from SCRIPT_NAME.
* What's left is the ROOT_PATH. * 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']); $file = str_replace('\\','/', $frame['file']);
$path = substr($file, strlen(ROOT_DIR)); $path = substr($file, strlen(ROOT_DIR));
if($path && ($pos=strpos($_SERVER['SCRIPT_NAME'], $path))!==false) if($path && ($pos=strpos($_SERVER['SCRIPT_NAME'], $path))!==false)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment