From 8e9bc00eab8fc5f4a15a598d9027bded07cda9e8 Mon Sep 17 00:00:00 2001 From: Sebastian Mendel Date: Thu, 29 Mar 2007 10:22:39 +0000 Subject: [PATCH] free memory! --- libraries/import/sql.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libraries/import/sql.php b/libraries/import/sql.php index a792dd90b..3c33b9860 100644 --- a/libraries/import/sql.php +++ b/libraries/import/sql.php @@ -54,6 +54,8 @@ if (isset($plugin_list)) { } else { // Append new data to buffer $buffer .= $data; + // free memory + unset($data); // Do not parse string when we're not at the end and don't have ; inside if ((strpos($buffer, $sql_delimiter, $i) === FALSE) && !$finished) { continue; @@ -123,7 +125,7 @@ if (isset($plugin_list)) { $ch = $buffer[$i]; // Quotes - if (!(strpos('\'"`', $ch) === FALSE)) { + if (strpos('\'"`', $ch) !== FALSE) { $quote = $ch; $endq = FALSE; while (!$endq) { @@ -160,8 +162,8 @@ if (isset($plugin_list)) { // Not enough data to decide if ((($i == ($len - 1) && ($ch == '-' || $ch == '/')) - || ($i == ($len - 2) && (($ch == '-' && $buffer[$i + 1] == '-') || ($ch == '/' && $buffer[$i + 1] == '*'))) - ) && !$finished) { + || ($i == ($len - 2) && (($ch == '-' && $buffer[$i + 1] == '-') + || ($ch == '/' && $buffer[$i + 1] == '*')))) && !$finished) { break; }