!is_null is mentioned in various files and modules. isset is well known to be faster than !is_null and should be used in case of variables instead of negating the negative to have the positive. This patch replaces all the occurrences of !is_null. If the patch got accepted and depending on the comments, I would provide a patch that replaces is_null with !isset.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | isset-is-faster-than-is_null-issue921098-3.patch | 1.91 KB | munzirtaha |
| isset-is-faster-than-is_null.patch | 4.33 KB | munzirtaha |
Comments
Comment #1
damien tournoud commentedThanks for this.
This is definitely a no brainer. Not sure how so many instances of
is_null()slipped thru the review process... :)Comment #2
dries commentedCommitted to CVS HEAD. Thanks. common.inc failed so that might require a re-roll
Comment #3
munzirtaha commentedThanks Dries, another patch because the repository is changing so fast.
Comment #4
dries commentedCommitted. Thanks!
Comment #5
munzirtaha commentedMy first pathes acceptance encourage me to add more patches to get rid of the remaining isset's: #921582, #921606, #921626.