Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix BUG #1103 #1125

Merged
merged 8 commits into from
Aug 20, 2013
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use ob
  • Loading branch information
dreamsxin committed Aug 20, 2013
commit ea426e369b9c4ec5d113f691497597f1031a4b95
24 changes: 8 additions & 16 deletions ext/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -964,13 +964,13 @@ PHP_METHOD(Phalcon_Debug, onUncaughtException){
zval *class_name, *css_sources, *escaped_message = NULL;
zval *html, *version, *file, *line, *show_back_trace;
zval *data_vars, *trace, *trace_item = NULL, *n = NULL, *html_item = NULL;
zval *_REQUEST, *value = NULL, *key_request = NULL, *key_value = NULL, *value_value = NULL, *joined_value = NULL, *_SERVER;
zval *_REQUEST, *value = NULL, *key_request = NULL, *joined_value = NULL, *_SERVER;
zval *key_server = NULL, *files, *key_file = NULL;
zval *memory, *data_var = NULL, *key_var = NULL, *variable = NULL, *dumped_argument = NULL;
zval *js_sources;
HashTable *ah0, *ah1, *ah2, *ah3, *ah4, *ah5;
HashPosition hp0, hp1, hp2, hp3, hp4, hp5;
zval **hd, **hd1;
HashTable *ah0, *ah1, *ah2, *ah3, *ah4;
HashPosition hp0, hp1, hp2, hp3, hp4;
zval **hd;

PHALCON_MM_GROW();

Expand Down Expand Up @@ -1115,19 +1115,11 @@ PHP_METHOD(Phalcon_Debug, onUncaughtException){
PHALCON_GET_HVALUE(value);

if (Z_TYPE_P(value) == IS_ARRAY) {
phalcon_is_iterable(value, &ah5, &hp5, 0, 0);
PHALCON_INIT_NVAR(joined_value);
while (zend_hash_get_current_data_ex(ah5, (void**) &hd, &hp5) == SUCCESS) {
PHALCON_GET_HKEY(key_value, ah5, hp5);
PHALCON_GET_HVALUE(value_value);

if (PHALCON_IS_EMPTY(joined_value)) {
PHALCON_CONCAT_VSV(joined_value, key_value, " => ", value_value);
} else {
PHALCON_SCONCAT_SVSV(joined_value, ", ", key_value, " => ", value_value);
}
zend_hash_move_forward_ex(ah5, &hp5);
}
phalcon_ob_start(TSRMLS_C);
zend_print_zval_r(value, 0);
phalcon_ob_get_contents(joined_value TSRMLS_CC);
phalcon_ob_end_clean(TSRMLS_C);
PHALCON_SCONCAT_SVSVS(html, "<tr><td class=\"key\">", key_request, "</td><td>Array( ", joined_value, " )</td></tr>");
} else {
PHALCON_SCONCAT_SVSVS(html, "<tr><td class=\"key\">", key_request, "</td><td>", value, "</td></tr>");
Expand Down