r82257 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82256‎ | r82257 | r82258 >
Date:17:00, 16 February 2011
Author:platonides
Status:deferred
Tags:
Comment:
Add the continuing condition to the continue branches.
The array stored by zend_fetch_debug_backtrace() inside trace needs to be destroyed, too.
Follow up r82046
Modified paths:
  • /trunk/php/wmerrors/wmerrors.c (modified) (history)

Diff [purge]

Index: trunk/php/wmerrors/wmerrors.c
@@ -188,14 +188,17 @@
189189 if (!entry || !*entry || Z_TYPE_PP(entry) != IS_ARRAY) {
190190 /* Not supposed to happen */
191191 smart_str_appendl(s, "?!? ", sizeof("?!? "));
 192+ zend_hash_move_forward_ex(Z_ARRVAL_P(trace), &pos);
192193 continue;
193194 }
 195+
194196 zend_hash_find(Z_ARRVAL_PP(entry), "file", sizeof("file"), (void **)&file);
195197 zend_hash_find(Z_ARRVAL_PP(entry), "line", sizeof("line"), (void **)&line);
196198
197199 if(!file || !*file || Z_TYPE_PP(file) != IS_STRING || !line || !*line || Z_TYPE_PP(line) != IS_LONG) {
198200 /* Not supposed to happen */
199201 smart_str_appendl(s, "?!?!? ", sizeof("?!?!? "));
 202+ zend_hash_move_forward_ex(Z_ARRVAL_P(trace), &pos);
200203 continue;
201204 }
202205 php_basename(Z_STRVAL_PP(file), Z_STRLEN_PP(file), NULL, 0, &basename, &basename_len TSRMLS_CC);
@@ -211,6 +214,7 @@
212215 FREE_ZVAL(line_copy);
213216 zend_hash_move_forward_ex(Z_ARRVAL_P(trace), &pos);
214217 }
 218+ zval_dtor(trace);
215219 FREE_ZVAL(trace);
216220 }
217221

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r82046wmerrors: Use a dirty hack to add concise backtraces (formatted as Foo.php:12...catrope00:35, 13 February 2011

Status & tagging log