mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
#605 - Fix for PDO insert entering empty data.
This commit is contained in:
@@ -415,6 +415,12 @@ class e_db_mysql
|
|||||||
|
|
||||||
if($this->pdo)
|
if($this->pdo)
|
||||||
{
|
{
|
||||||
|
// print_a($query);
|
||||||
|
// $prep = $this->mySQLaccess->prepare($query);
|
||||||
|
// print_a($query);
|
||||||
|
// print_a($prep);
|
||||||
|
// echo "<hr>";
|
||||||
|
// $sQryRes = $prep->execute($query);
|
||||||
$sQryRes = $this->mySQLaccess->query($query);
|
$sQryRes = $this->mySQLaccess->query($query);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -746,6 +752,8 @@ class e_db_mysql
|
|||||||
$tmp[] = $this->_getFieldValue($fk, $fv, $fieldTypes);
|
$tmp[] = $this->_getFieldValue($fk, $fv, $fieldTypes);
|
||||||
}
|
}
|
||||||
$valList= implode(', ', $tmp);
|
$valList= implode(', ', $tmp);
|
||||||
|
|
||||||
|
|
||||||
unset($tmp);
|
unset($tmp);
|
||||||
|
|
||||||
if($REPLACE === FALSE)
|
if($REPLACE === FALSE)
|
||||||
@@ -1710,6 +1718,12 @@ class e_db_mysql
|
|||||||
*/
|
*/
|
||||||
function escape($data, $strip = true)
|
function escape($data, $strip = true)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if($this->pdo)
|
||||||
|
{
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
if ($strip)
|
if ($strip)
|
||||||
{
|
{
|
||||||
$data = strip_if_magic($data);
|
$data = strip_if_magic($data);
|
||||||
@@ -1721,6 +1735,8 @@ class e_db_mysql
|
|||||||
$this->mySQLaccess = $db_ConnectionID;
|
$this->mySQLaccess = $db_ConnectionID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return mysql_real_escape_string($data,$this->mySQLaccess);
|
return mysql_real_escape_string($data,$this->mySQLaccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user