( ! ) Fatal error: Call to undefined function decode_entities() in /var/www/drupal7x/includes/common.inc on line 1552
Call Stack
# Time Memory Function Location
1 0.0000 60076 {main}( ) ../index.php:0
2 0.0006 109736 drupal_bootstrap( ) ../index.php:21
3 0.0102 608372 _drupal_bootstrap_page_header( ) ../bootstrap.inc:2047
4 0.0102 608444 bootstrap_invoke_all( ) ../bootstrap.inc:2270
5 0.0105 608976 module_invoke( ) ../bootstrap.inc:905
6 0.0105 609592 call_user_func_array ( ) ../module.inc:793
7 0.0105 609908 devel_boot( ) ../module.inc:0
8 0.0105 609908 devel_xhprof_enable( ) ../devel.module:571
9 0.0106 611336 _drupal_error_handler( ) ../bootstrap.inc:0
10 0.0107 612340 _drupal_error_handler_real( ) ../bootstrap.inc:2095
11 0.0347 1908404 filter_xss_admin( ) ../errors.inc:82
12 0.0347 1915756 filter_xss( ) ../common.inc:1295
13 0.0350 1922680 preg_replace_callback ( ) ../common.inc:1356
14 0.0350 1924072 _filter_xss_split( ) ../common.inc:0
15 0.0351 1926064 _filter_xss_attributes( ) ../common.inc:1423
16 0.0354 1927580 filter_xss_bad_protocol( ) ../common.inc:1488
reproduce
1. download and enable devel-7-dev
2. set a wrong path to xhprof
3. save conf
** It said in common.inc on line 1552 , so I think this is a core issue.
Comments
Comment #1
salvisWe have two issues here:
1. In Devel's
there could be some error checking.
2. The core error handler should be able to handle errors during hook_boot() without tripping over the missing decode_entities().
The error message, if we'd actually get to see it, might be good enough that #1 is ok as it is, so let's fix #2 first.
require_onceis inefficient. We should at least wrap this inif (!function_exists ('decode_entities')).I'm still setting this to 'needs review' in order to get some feedback whether this is the right approach.
Comment #2
droplet commentedadded function_exists check
Comment #3
moshe weitzman commentedLooks proper to me.
Comment #4
Stevel commentedThis is the same patch, I only removed the trailing whitespace, so leaving as RTBC.
Comment #6
Stevel commented#4: de_4.patch queued for re-testing.
Test failures make no sens. The include should even never happen in the current test coverage, otherwise, tests should have been failing before. So this is patch is a no-op as far as the tests are concerned.
Comment #7
Stevel commentedBack to RTBC as per #3.
Comment #8
webchickYeah, one of the test bots appears to be on crack again.
Committed to HEAD. Thanks!
Comment #9
salvisThanks all!
@droplet: Now what is the error message that you get from Devel (#1.1)? If we stilll need to do something there then please open a new follow-up issue in the Devel queue and link there.
Oh, and BTW, have you tried Devel's own Backtrace error handler? It should work from hook_boot(), too, or course...
Comment #10
droplet commented@salvis
created a new issue for devel XHProf issue
#1012562: add XHProf path checks
(ya, Ive tried Devel backtrace, I'm still learning debug skills, thanks for the tips :).
Comment #11
salvis(That wasn't intended so much as a hint but rather as a question whether Devel's Backtrace error handler needed fixing, too, when it's called in the same situation. IOW, does it have the same bug that you just fixed in core?)