[TYPO3-core] RFC: Feature Request 6037: Performance tunning in t3lib_div by removing elderly PHP functions

Michael Stucki michael at typo3.org
Mon Feb 25 14:05:46 CET 2008


Thanks for the explanation. I changed this now according to your suggestion
below.

- michael

Oliver Hader wrote:

> Hi Michael,
> 
> Michael Stucki schrieb:
>> see attached patch - was this a typo, or intention? Well, it won't break
>> anything, but it's confusing...
> 
> -             return (strpos('>,'.$list.',', ','.$item.',') ? true : false);
> +             return (strpos(','.$list.',', ','.$item.',') ? true : false);
> 
> Intention, but I agree that it is confusing.
> The '>,' was added that a positive match would return "1" as integer. If
> the first item in a list would match the position "0" would be returned.
> That was the reason.
> 
> If the '>' gets removed, the correct check has to be
> strpos(','.$list.',', ','.$item.',')!==false ? true : false
> 
> olly

-- 
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/


More information about the TYPO3-team-core mailing list