[TYPO3-core] RFC #14997: Performance: t3lib_db->escapeStrForLike() is using preg_replace, which is not necessary
caspar at gosign.de
caspar at gosign.de
Mon Jul 5 00:40:47 CEST 2010
This is an SVN patch request.
Type: Performance
Bugtracker references:
http://bugs.typo3.org/view.php?id=14997
Branches:
Trunk
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.
Caspar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug_14997.patch
Type: application/octet-stream
Size: 410 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100705/b8e0b055/attachment.obj>
More information about the TYPO3-team-core
mailing list