View Issue Details

IDProjectCategoryView StatusLast Update
0000445XdebugUncategorizedpublic2009-07-05 22:20
Reporterkent Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version2.0.0dev 
Summary0000445: error_prepend_string and error_append_string are ignored by xdebug_error_cb
Description

xdebug_error_cb does not output PHP ini settings error_prepend_string, or error_append_string

Additional Information

On our developement systems, we use a specially crafted error_prepend_string and error_append_string to both highlight errors on scripts, but also as a means of automated testing using Selenium. When a specific error string is output on a web page, we can automatically detect the error on PHP pages.

Since we have recently switched to Xdebug and Netbeans, the errors were not being detected, and after investigation it turns out the Xdebug was the culprit.

The fix is simple. The following patch can be applied to xdebug.c version 2.0.4:

1812a1813,1814

  char * prepend_string;
  char * append_string;

1820c1822,1823
< xdebug_str_add(&str, formats[0], 0);

    prepend_string = INI_STR("error_prepend_string");
    append_string = INI_STR("error_append_string");

1821a1825,1826
xdebug_str_add(&str, prepend_string ? prepend_string : "", 0);
xdebug_str_add(&str, formats[0], 0);
1953a1959
xdebug_str_add(&str, append_string ? append_string : "", 0);

It mostly patches the get_printable_stack function.

Thanks for a great tool!

TagsNo tags attached.
Operating SystemFreeBSD 7.2 RELEASE
PHP Version5.2.8

Activities

derick

2009-06-21 00:18

administrator   ~0000967

Could you please attach the patch (please make with diff -u) as file to this report?

kent

2009-06-22 01:38

reporter   ~0000969

Last edited: 2009-06-22 01:41

I don't have permission to upload, I think... Can you grant me permission first?

derick

2009-07-05 22:20

administrator   ~0000979

Fixed in CVS (for Xdebug 2.1 only) and thanks for the patch!

Issue History

Date Modified Username Field Change
2009-06-16 03:11 kent New Issue
2009-06-16 03:11 kent Operating System => FreeBSD 7.2 RELEASE
2009-06-16 03:11 kent PHP Version => 5.2.8
2009-06-16 03:11 kent Xdebug Version => 2.0.4-dev
2009-06-21 00:18 derick Note Added: 0000967
2009-06-21 00:18 derick Status new => feedback
2009-06-22 01:38 kent Note Added: 0000969
2009-06-22 01:41 kent Note Edited: 0000969
2009-07-05 22:20 derick Note Added: 0000979
2009-07-05 22:20 derick Status feedback => closed
2009-07-05 22:20 derick Resolution open => fixed
2016-07-31 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized