From 36f0e464354f6dddf9b99242cec7ee4943efa476 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 23 Sep 2006 19:19:11 +0000 Subject: [PATCH] Moving some checks from kernel.php to Loader.php --- Loader.php | 26 ++++++++++++++++++++++++++ kernel.php | 24 ------------------------ 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/Loader.php b/Loader.php index 4a3d1dc..74c0773 100644 --- a/Loader.php +++ b/Loader.php @@ -25,6 +25,32 @@ * @package ISSO */ +// we need PHP5 to run +if (!function_exists('stripos')) +{ + trigger_error('You need PHP version 5.0.0 or newer to run ISSO', E_USER_ERROR); + exit; +} + +// get rid of register_globals +if ((bool)ini_get('register_globals') === true) +{ + $superglobals = array('_GET', '_COOKIE', '_FILES', '_POST', '_SERVER', '_ENV'); + foreach ($superglobals AS $global) + { + if (is_array(${$global})) + { + foreach (${$global} AS $_key => $_val) + { + if (isset(${$_key})) + { + unset(${$_key}); + } + } + } + } +} + /** * System Loader * diff --git a/kernel.php b/kernel.php index d3ad141..4db0b41 100644 --- a/kernel.php +++ b/kernel.php @@ -26,30 +26,6 @@ * @package ISSO */ -if (!function_exists('stripos')) -{ - trigger_error('You need PHP version 5.0.0 or newer to run ISSO', E_USER_ERROR); - exit; -} - -if ((bool)ini_get('register_globals') === true) -{ - $superglobals = array('_GET', '_COOKIE', '_FILES', '_POST', '_SERVER', '_ENV'); - foreach ($superglobals AS $global) - { - if (is_array(${$global})) - { - foreach (${$global} AS $_key => $_val) - { - if (isset(${$_key})) - { - unset(${$_key}); - } - } - } - } -} - /** * Yes, required */ -- 2.43.5