Actions
Bug #23099
closedt3lib_db->escapeStrForLike() performance
Start date:
2010-07-04
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
4.4
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
The function t3lib_db->escapeStrForLike() uses preg_replace to escape the values '%' and '_' with an '\' 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.
(issue imported from #M14997)
Files
Updated by Marcus Krause about 14 years ago
Added a benchmark script that compares usage of preg_replace(), str_replace() and addcslashes().
Updated by Francois Suter about 14 years ago
Committed v3 to trunk in revision 8940
Actions