Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In functions dcp() and devel_watchdog(), devel.module checks for class existence for ChromePHP and FirePHP respectively by using class_exists() with only one parameter. This causes autoload implementation to trigger uselessly for theses classes. The second parameter should be passed as FALSE to avoid triggering autoload.
Comment | File | Size | Author |
---|---|---|---|
#2 | class_exists_no_autoload-1212658-2.patch | 813 bytes | fgm |
Comments
Comment #1
salvisPatch for D8/D7?
Comment #2
fgmPatch for D8. Will need backport afterwards.
Comment #3
salvisCommitted to D8/D7, thanks!
Patch for D6?
Comment #4
pcambraTagging
Comment #5
mr.baileysI found this issue when I was about to log the presence of autoload = FALSE in dcp() as a bug in the devel issue queue: I'm using Composer Manager to install ChromePhp (all on D7), expecting everything to just work, but the only way I can make it work is by patching devel to get rid of the autoload = FALSE in the class_exists().
Seems like a bug to me since even though ChromePhp is installed and I can call ChromePhp::log() from anywhere in my code, devel refuses to use it unless I patch it.
is there a noticeable performance penalty to leaving autoloading enabled in these class_exists() calls?
Comment #6
lussolucaIn #2191395: Make dpm() and friends pluggable (with Krumo, Kint, Ladybug etc) the second parameter of class_exists has been set to FALSE.
Comment #7
lussolucaComment #8
willzyx CreditAttribution: willzyx commentedMoving to 7.x
Comment #9
willzyx CreditAttribution: willzyx commentedLooks like dcp() in 7.x branch already contains this fix. Sorry :P
The 6.x doesn't contains the fix but Drupal 6 is no longer supported so i'm closing this issue