commit | 263d2eb0888b971043d8935b40fab7e0b53f4cd8 | [log] [tgz] |
---|---|---|
author | Andrey Andreev <narf@bofh.bg> | Mon Jun 25 18:17:14 2012 +0300 |
committer | Andrey Andreev <narf@bofh.bg> | Mon Jun 25 18:17:14 2012 +0300 |
tree | bf06350b17b4d9daa3fb6b69fc18696348bb6085 | |
parent | e61b19f90e23e6b7f51e910b488a37f6f8fb7c93 [diff] |
Optimize PDO escape_str()
diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php index 3197e75..d18720e 100644 --- a/system/database/drivers/pdo/pdo_driver.php +++ b/system/database/drivers/pdo/pdo_driver.php
@@ -264,7 +264,7 @@ $str = $this->conn_id->quote($str); // If there are duplicated quotes, trim them away - if (strpos($str, "'") === 0) + if ($str[0] === "'") { $str = substr($str, 1, -1); }