-
Type: Task
-
Status: Closed
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 5.0.0
-
Fix Version/s: 5.0.2
-
Component/s: Optimization
-
Labels:None
-
External issue URL:
-
External issue ID:236
-
Copy Issue Key:
-
Patch Instructions:
Currently in some places we are using mentioned later code to strip trailing word from string:
$pos_sql = preg_replace('/(.*) OR $/', '
1', $pos_sql)
This is not very efficient and should be replaced with code like this:
$pos_sql = substr($pos_sql, -2); // "-2" is "(-1) * strlen('OR')"
- relates to
-
INP-229 Get rid of ereg* functions usage, because they are slow and are deprecated since PHP 5.3
- Closed