Michal C(ihar( wrote:
On Sat 18. 9. 2004 16:19, Marc Delisle wrote:
The trim occurs at 2 places:
Only 2? I (grep) sees 6 :-)
Hi Michal,
in the code flow for this problem, I see only those 2 that were executed.
$ grep trim read_dump.php libraries/read_dump.lib.php sql.php | wc -l 6
read_dump.php, line 138 libraries/read_dump.lib.php, line 21
The bug is fixed by replacing the one at line 21 by $sql = rtrim($sql, "\n\r");
(avoid removing the last space which is necessary for ANSI-style comment)
and removing the one at line 138, however can someone tell me the purpose of the trim at line 138?
Well we have quite plenty trims over code and most of them are actually not necessary, maybe we could remove them and see if actually something breaks (I doubt that not trimming SQL could cause problem).
OK I will do more tests by trimming the trim() :)
Marc