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.
Every time I go to type in this function I spell it module_exists and cause a big old parse error. Why?
1. module_exists is proper English.
2. It also mirrors the PHP function function_exists.
Patch renames throughout core, and as an extra added bonus, provides the original module_exist function in legacy.module if you are so inclined.
Please, for webchick's already failing sanity, +1. ;)
Comment | File | Size | Author |
---|---|---|---|
#6 | module_exists_0.patch | 22.76 KB | webchick |
module_exists.patch | 23.17 KB | webchick | |
Comments
Comment #1
dman CreditAttribution: dman commentedDitto ditto ditto.
Comment #2
seandunaway CreditAttribution: seandunaway commented+1 cause webchick told me to
Comment #3
chx CreditAttribution: chx commentedThose two reasons webchick mentioned. Setting to critical because I just can't stand another release with this.
Comment #4
eaton CreditAttribution: eaton commentednice use of legacy module!
+1. Booyah.
Comment #5
dww+100, because this is a beautiful thing. webchick didn't have to tell me to say it. ;)
this is a nice touch in legacy.module:
anyway, definitely a good move, definitely RTBC. ;)
Comment #6
webchickAnd just in case Dries or whomever is NOT so inclined, here is the same patch without the legacy.module inclusion. Take your pick. :)
Comment #7
flk CreditAttribution: flk commentedhell yes +1
keep making the same ol mistake of exists rather than exist
Comment #8
eaton CreditAttribution: eaton commentedProbably not really an appropriate use of critical, as things work fine without it. But it's a persistent, long-term misspelling that makes checking modules counter-intuitive. Just because it's not critical doesn't mean that this typo in a key core function doesn't make baby Jesus cry.
Comment #9
gordon CreditAttribution: gordon commented+1, Also there are a lot of other php functions that use exists vs exist
see http://www.php.net/manual-lookup.php?pattern=exists&lang=en to see more like file_exists(), class_exists(), ...
Comment #10
Steven CreditAttribution: Steven commentedGood catch. Committed to HEAD.
I don't really like the legacy.module part though... modules need to be updated for 4.8 anyway, and it's a search-and-replace change that is easily documented.
Comment #11
webchickDocumented @ http://drupal.org/node/64279. Thanks so much!
Comment #12
(not verified) CreditAttribution: commented