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.
If a class begins with an underscore, this can currently crash the class loader.
In particular, it will crash xautoload_ClassFinder_Helper_Map::findFile_map()
.
I am sure we can fix this.
Comment | File | Size | Author |
---|---|---|---|
#2 | xautoload-7.x-3.x-class-with-underscore-1930084-2.patch | 1.27 KB | donquixote |
Comments
Comment #1
clivelinsell CreditAttribution: clivelinsell commentedThis is currently causing a problem using XAutoload with the Crumbs module (http://drupal.org/project/crumbs)
Any news on a fix? I'd be happy to provide a patch myself if you can point me in the right direction...
Thanks
Comment #2
donquixote CreditAttribution: donquixote commentedHi!
I am currently traveling, so don't have that much time to look into this.
I know that I fixed the bug somewhere locally, and it was not that hard.. but I don't know where to find it atm :(
The places to look would be
lib/ClassFinder/Prefix.php
lib/ClassFinder/NamespaceOrPrefix.php
each in the findFile() method.
I think what I did was to totally block class loading if the first character is an underscore.
But instead you could say that the underscore will be part of the first fragment..
Could you try this patch?
Comment #3
donquixote CreditAttribution: donquixote commented..
Comment #4
clivelinsell CreditAttribution: clivelinsell commentedPatch in #2 has done the trick, thank you very much :)
Comment #5
donquixote CreditAttribution: donquixote commentedFixed in 7.x-3.1
Comment #6
donquixote CreditAttribution: donquixote commentedTo be fair, this was a bug. Not a task.
Comment #7
donquixote CreditAttribution: donquixote commentedJust enabled the automated testing for issues.. let's try if this works :)
Comment #8
donquixote CreditAttribution: donquixote commentedAnd of course it is still fixed.