Steps to reproduce:
- Run any one of the database tests
- On the results page, reload (admin/build/testing)
Error:
warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'database_test_query_alter' was given in /home/davereid/Projects/drupal-head/includes/common.inc on line 2750.
My guess would be that the database tests are not properly unloading the database_test.module somehow and trying to use the _query_alter on a non-test database query.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 321161-simpletest-flush-module-implement.patch | 916 bytes | damien tournoud |
Comments
Comment #1
dave reidLittle better title.
Comment #2
damien tournoud commentedThis is the combination of two issues:
1. DWTC->tearDown() don't flush the module_implements() static cache (this is bad)
2. there is no way to flush registry_cache_hook_implementations() static cache, so implementations of all modules loaded across a page request will get saved to the registry cache at the end of the request (when drupal_footer is called), even if the module_implements() static cache is properly flushed ===> the rogue implementations will be reloaded at the next request! (this is even worse)
(1) could be solved by a patch to DWTC... (2) is already solved by #298600: DBTNG: make module_implements work regardless of bootstrap phase.
Bumping to critical, since that could have other side-effects.
Comment #3
damien tournoud commentedNow that #298600: DBTNG: make module_implements work regardless of bootstrap phase when in, this is now worse: the implementation is permanently staying...
Comment #4
damien tournoud commentedEasy fix.
Comment #5
chx commentedThanks for the fix.
Comment #6
dries commentedCommitted to CVS HEAD. Thanks.