Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
27 Mar 2007 at 11:50 UTC
Updated:
22 Apr 2007 at 00:46 UTC
Jump to comment: Most recent file
Drupal core, Drupal contrib and 3rd party libraries are all equally guilty of abusing the global namespace in PHP.
This particular issue deals with one particular function that is often in conflict: error_handler().
Drupal's really should be named drupal_error_handler().
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | contrib_handler_d47.patch | 1.48 KB | Chris Johnson |
| #5 | contrib_handler_d6.patch | 2.14 KB | Chris Johnson |
| #3 | error_handler_d47.patch | 1.13 KB | Chris Johnson |
| #2 | error_handler_d5.patch | 1.12 KB | Chris Johnson |
| #1 | error_handler_d6.patch | 1.11 KB | Chris Johnson |
Comments
Comment #1
Chris Johnson commentedPatch for Drupal 6 core attached.
Comment #2
Chris Johnson commentedPatch for Drupal 5 attached.
Comment #3
Chris Johnson commentedPatch for Drupal 4.7 attached.
Comment #4
Chris Johnson commentedExample problem with the 3rd party Sparkline library: http://drupal.org/node/131060
Comment #5
Chris Johnson commentedPatch for all Drupal 6 contrib modules which call the core error_handler() function directly.
Comment #6
Chris Johnson commentedPatch for all Drupal 4.7 contrib modules which call the core error_handler() function directly.
Note these are only modules which are actually tagged DRUPAL-4-7.
Note also that there appear to be no modules tagged DRUPAL-5 with these calls, which leads me to believe they simply are not tagged, rather than they don't exists. For example, both modules patched here for 4.7 are also patched in HEAD for 6.
Comment #7
dries commentedWorks for me. Will commit when home. :-)
Comment #8
dries commentedCommitted to CVS HEAD. Thanks.
Comment #9
Chris Johnson commentedGreat!
If I just had time, I'd go through all of core (and then all of contrib), and clean up all the namespace problems. Then I'd continue with cleaning up all the other little things. ;-)
Can this be applied to D5 if we roll another 5.x release? I know the sparkline users would appreciate it. (Do we have a policy on core changes after a release?)
Comment #10
drummI don't think this will go into 5. Function name changes are generally API changes, although this function might be exempt since it is the internal error handler.
Comment #11
(not verified) commented