Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
other
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
31 Dec 2008 at 12:36 UTC
Updated:
10 May 2009 at 06:10 UTC
Jump to comment: Most recent file
there are some places in drupal where it would be better(faster) to use strpos than strstr
8124 passes, 0 fails, and 0 exceptions
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | 352880-replace-strstr-with-strpos-D7.patch | 3.78 KB | dave reid |
| #15 | strstr_to_strpos.patch | 3.51 KB | dawehner |
| #10 | strstr_to_strpos_4.patch | 3.68 KB | dawehner |
| #7 | strstr_to_strpos_3.patch | 3.49 KB | dawehner |
| #2 | strstr_to_strpos_2.patch | 4.09 KB | dawehner |
Comments
Comment #1
damien tournoud commentedYou will need to strictly compare the result with FALSE, like this:
... because strpos() can return 0.
Comment #2
dawehnerthx
here is the new patch
8124 passes, 0 fails, and 0 exceptions
Comment #3
dawehnerComment #5
catchComment #6
catchDoesn't apply any longer.
Comment #7
dawehneri rerolled this patch
Comment #8
dawehnerComment #9
dave reidLooks like we're missing the same !== FALSE on
$checked = strpos($format->roles, ",$rid,");.Comment #10
dawehneroh thx, for the review
next patch
Comment #11
dawehnerComment #14
dawehnerrerole
Comment #15
dawehnerComment #17
dave reidComment #19
dawehnerComment #20
dave reidRe-rolled and re-posted to catch the testing bot again.
Comment #21
c960657 commentedLooks good to me.
Comment #22
chx commentedI like it too and so does the bot.
Comment #23
dries commentedCommitted to CVS HEAD. Thanks.