[TYPO3-core] RFC #14997: Performance: t3lib_db->escapeStrForLike() is using preg_replace, which is not necessary

Helmut Hummel helmut at typo3.org
Sat Sep 4 22:24:32 CEST 2010


Hi,

On 28.08.10 17:38, François Suter wrote:
> 
>> Problem:
>> The function t3lib_db->escapeStrForLike() is using preg_replace to escape
>> the values '%' and '_' with a '\' for a sql-like-statement.
>> preg_replace takes a lot of recources and is not necessary for such a
>> simple replacement.
>>
>> Solution:
>> use str_replace instead.
> 
> +1 after reading and testing.

+1 after reading and testing.

Regards Helmut


More information about the TYPO3-team-core mailing list