Posted by Dave Reid on October 14, 2008 at 4:23pm
5 followers
| Project: | Drupal core |
| Version: | 7.x-dev |
| Component: | base system |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
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.
Comments
#1
Little better title.
#2
This 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.
#3
Now that #298600: DBTNG: make module_implements work regardless of bootstrap phase when in, this is now worse: the implementation is permanently staying...
#4
Easy fix.
#5
Thanks for the fix.
#6
Committed to CVS HEAD. Thanks.
--project followup subject--
Automatically closed -- issue fixed for two weeks with no activity.
#7
Automatically closed -- issue fixed for two weeks with no activity.