From 0af068d1196dfa4783fd5179cf87f82a822d15a8 Mon Sep 17 00:00:00 2001 From: cajus Date: Thu, 2 Jun 2005 07:38:08 +0000 Subject: [PATCH] Restored PHP 4.1 compatibilty git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@581 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/functions.inc | 80 ++++++++++++++++++++++--------------------- 1 file changed, 41 insertions(+), 39 deletions(-) diff --git a/include/functions.inc b/include/functions.inc index b01d42a69..42d2f2a3f 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -1557,52 +1557,54 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline) } } - /* Extract traceback data */ - $trace= debug_backtrace(); - /* Create error header */ $error_collector.= ""; - /* Generate trace history */ - for ($index= 1; $index": - $type= _("method"); - break; + if (isset($ct['type'])){ + switch ($ct['type']){ + case "::": + $type= _("static"); + break; + + case "->": + $type= _("method"); + break; + } + } else { + $type= "-"; } - } else { - $type= "-"; - } - $args= ""; - foreach ($ct['args'] as $arg){ - $args.= htmlentities("\"$arg\", "); - } - $args= preg_replace("/, $/", "", $args); - if ($args == ""){ - $args= "-"; + $args= ""; + foreach ($ct['args'] as $arg){ + $args.= htmlentities("\"$arg\", "); + } + $args= preg_replace("/, $/", "", $args); + if ($args == ""){ + $args= "-"; + } + $file= $ct['file']; + $line= $ct['line']; + $color= ($index&1)?'#404040':'606060'; + $error_collector.= ""; + $error_collector.= ""; + $error_collector.= ""; } - $file= $ct['file']; - $line= $ct['line']; - $color= ($index&1)?'#404040':'606060'; - $error_collector.= ""; - $error_collector.= ""; - $error_collector.= ""; } /* Close error table */ -- 2.30.2

"._("PHP error")." \"$errstr\"

"._("Trace")."[$index]: $loc"._("File").": $file ("._('Line')." $line)"._("Type").": $type
"._("Arguments").": $args
"._("Trace")."[$index]: $loc"._("File").": $file ("._('Line')." $line)"._("Type").": $type
"._("Arguments").": $args