summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/database/drivers/ibase/ibase_driver.php2
-rw-r--r--system/database/drivers/mysql/mysql_driver.php2
-rw-r--r--system/database/drivers/mysqli/mysqli_driver.php2
-rw-r--r--system/libraries/Image_lib.php2
4 files changed, 4 insertions, 4 deletions
diff --git a/system/database/drivers/ibase/ibase_driver.php b/system/database/drivers/ibase/ibase_driver.php
index 87faf3d08..875f148a1 100644
--- a/system/database/drivers/ibase/ibase_driver.php
+++ b/system/database/drivers/ibase/ibase_driver.php
@@ -421,7 +421,7 @@ class CI_DB_ibase_driver extends CI_DB {
.($this->qb_offset ? $this->qb_offset.' TO '.($this->qb_limit + $this->qb_offset) : $this->qb_limit);
}
- return preg_replace('`SELECT`i', 'SELECT '.$select, $sql);
+ return preg_replace('`SELECT`i', 'SELECT '.$select, $sql, 1);
}
// --------------------------------------------------------------------
diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php
index 98d553b2c..c6b46f070 100644
--- a/system/database/drivers/mysql/mysql_driver.php
+++ b/system/database/drivers/mysql/mysql_driver.php
@@ -237,7 +237,7 @@ class CI_DB_mysql_driver extends CI_DB {
// modifies the query so that it a proper number of affected rows is returned.
if ($this->delete_hack === TRUE && preg_match('/^\s*DELETE\s+FROM\s+(\S+)\s*$/i', $sql))
{
- return preg_replace('/^\s*DELETE\s+FROM\s+(\S+)\s*$/', 'DELETE FROM \\1 WHERE 1=1', $sql);
+ return trim($sql).' WHERE 1=1';
}
return $sql;
diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php
index 966a7b1fd..be9176e16 100644
--- a/system/database/drivers/mysqli/mysqli_driver.php
+++ b/system/database/drivers/mysqli/mysqli_driver.php
@@ -214,7 +214,7 @@ class CI_DB_mysqli_driver extends CI_DB {
// modifies the query so that it a proper number of affected rows is returned.
if ($this->delete_hack === TRUE && preg_match('/^\s*DELETE\s+FROM\s+(\S+)\s*$/i', $sql))
{
- return preg_replace('/^\s*DELETE\s+FROM\s+(\S+)\s*$/', 'DELETE FROM \\1 WHERE 1=1', $sql);
+ return trim($sql).' WHERE 1=1';
}
return $sql;
diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php
index 54a134f50..6d5493696 100644
--- a/system/libraries/Image_lib.php
+++ b/system/libraries/Image_lib.php
@@ -1491,7 +1491,7 @@ class CI_Image_lib {
{
case 1 : imagegif($resource);
break;
- case 2 : imagejpeg($resource, '', $this->quality);
+ case 2 : imagejpeg($resource, NULL, $this->quality);
break;
case 3 : imagepng($resource);
break;