1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-02 20:57:26 +02:00

Stop Apache crashing with ?[debug-]

This commit is contained in:
e107steved
2008-01-19 13:17:02 +00:00
parent 855e2c58b8
commit 99be7eb362

View File

@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_handlers/debug_handler.php,v $ | $Source: /cvs_backup/e107_0.8/e107_handlers/debug_handler.php,v $
| $Revision: 1.4 $ | $Revision: 1.5 $
| $Date: 2007-06-21 16:55:10 $ | $Date: 2008-01-19 13:17:02 $
| $Author: sweetas $ | $Author: e107steved $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -112,13 +112,18 @@ class e107_debug {
// removed: inline debug breaks pages! // removed: inline debug breaks pages!
); );
function e107_debug() { function e107_debug()
if (preg_match('/debug(=?)(.*?),?(\+|stick|-|unstick|$)/', e_MENU, $debug_param) || isset($_COOKIE['e107_debug_level'])) { {
$dVals=0; if (preg_match('/debug(=?)(.*?),?(\+|stick|-|unstick|$)/', e_MENU, $debug_param) || isset($_COOKIE['e107_debug_level']))
if (isset($_COOKIE['e107_debug_level'])) { {
$dVals='';
if (!isset($debug_param[1]) || ($debug_param[1]=='')) $debug_param[1] = '=';
if (isset($_COOKIE['e107_debug_level']))
{
$dVals = substr($_COOKIE['e107_debug_level'],6); $dVals = substr($_COOKIE['e107_debug_level'],6);
} }
if (preg_match('/debug(=?)(.*?),?(\+|stick|-|unstick|$)/', e_MENU)) { if (preg_match('/debug(=?)(.*?),?(\+|stick|-|unstick|$)/', e_MENU))
{
$dVals = $debug_param[1] == '=' ? $debug_param[2] : 'everything'; $dVals = $debug_param[1] == '=' ? $debug_param[2] : 'everything';
} }
@@ -126,9 +131,12 @@ class e107_debug {
$dVal = 0; $dVal = 0;
foreach ($aDVal as $curDVal) foreach ($aDVal as $curDVal)
{ {
if (isset($this->aDebugShortcuts[$curDVal])) { if (isset($this->aDebugShortcuts[$curDVal]))
{
$dVal |= $this->aDebugShortcuts[$curDVal]; $dVal |= $this->aDebugShortcuts[$curDVal];
} else { }
else
{
$dVal |= $curDVal; $dVal |= $curDVal;
} }
} }
@@ -149,7 +157,9 @@ class e107_debug {
} }
} }
function set_error_reporting() {
function set_error_reporting()
{
} }
} }