#11176 closed enhancement (fixed)
Convert strpos/strtolower to stripos
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 3.0 | Priority: | lowest |
Severity: | trivial | Version: | 2.9 |
Component: | Performance | Keywords: | has-patch |
Focuses: | Cc: |
Description
A quick grep shows the core using 18 instances of strpos and strto(low|upp)er in tandem. Most if not all can be converted to stripos.
Attachments (1)
Change History (8)
#1
@
15 years ago
- Keywords has-patch added
- Milestone changed from Future Release to 3.0
- Priority changed from normal to lowest
- Severity changed from normal to trivial
#3
@
15 years ago
- Type changed from defect (bug) to enhancement
Yes, the ones patched should be good. Here are the files that use strpos + strtolower included in the patch:
admin-ajax.php
wp-admin/includes/media.php
wp-admin/includes/class-wp-filesystem-ftpext.php
wp-includes/general-template.php
wp-includes/vars.php
Omitted from patch:
wp-admin/load-scripts.php
wp-admin/load-styles.php
wp-includes/js/tinymce/wp-tinymce.php
wp-includes/js/tinymce/plugins/spellchecker/classes/utils/Logger.php
#4
@
15 years ago
For the log: stripos is available since PHP 5. Most of the hosts will benefit from this change. Nice find.
Note: See
TracTickets for help on using
tickets.
@nacin: haven't tested, but did you make sure that the compat functions were loaded in each of those files? if they're not, we'd break php 4 installs.