[geeklog-cvs] geeklog: tweak call stack display so we don't get an empty table

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Sep 18 10:26:02 EDT 2011


changeset 8415:cf0329a7cdd4
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/cf0329a7cdd4
user: Dirk Haun <dirk at haun-online.de>
date: Sun Sep 18 14:03:31 2011 +0200
description:
tweak call stack display so we don't get an empty table

diffstat:

 public_html/lib-common.php |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (25 lines):

diff -r ddf0f21afaad -r cf0329a7cdd4 public_html/lib-common.php
--- a/public_html/lib-common.php	Sun Sep 18 13:30:17 2011 +0200
+++ b/public_html/lib-common.php	Sun Sep 18 14:03:31 2011 +0200
@@ -7025,15 +7025,17 @@
                 echo "$errcontext</body></html>";
             } else {
                 $btr = debug_backtrace();
-                if (! empty($btr)) {
+                if (count($btr) > 0) {
+                    if ($btr[0]['function'] == 'COM_handleError') {
+                        array_shift($btr);
+                    }
+                }
+                if (count($btr) > 0) {
                     echo "<font size='1'><table class='xdebug-error' dir='ltr' border='1' cellspacing='0' cellpadding='1'>\n";
                     echo "<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>\n";
                     echo "<tr><th align='right' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>File</th><th align='right' bgcolor='#eeeeec'>Line</th></tr>\n";
                     $i = 1;
                     foreach ($btr as $b) {
-                        if ($b['function'] == 'COM_handleError') {
-                            continue;
-                        }
                         $f = '';
                         if (! empty($b['file'])) {
                             $f = $b['file'];



More information about the geeklog-cvs mailing list