From 520497bb902f99823d0d15400ce5ae939b7062b3 Mon Sep 17 00:00:00 2001 From: Michael O'Connell Date: Mon, 29 Oct 2012 13:57:30 -0500 Subject: [PATCH 1/2] Fix Varien_Io_Sftp::write uploading the file path rather than file contents --- lib/Varien/Io/Sftp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Varien/Io/Sftp.php b/lib/Varien/Io/Sftp.php index 814e31531b002..13440d5944ee5 100644 --- a/lib/Varien/Io/Sftp.php +++ b/lib/Varien/Io/Sftp.php @@ -179,7 +179,7 @@ public function read($filename, $dest=null) */ public function write($filename, $src, $mode=null) { - return $this->_connection->put($filename, $src); + return $this->_connection->put($filename, $src, NET_SFTP_LOCAL_FILE); } /** From a8beda7322c4d09b0ec089e37b95ddc4f59ee0e8 Mon Sep 17 00:00:00 2001 From: Michael O'Connell Date: Thu, 18 Apr 2013 11:04:27 -0700 Subject: [PATCH 2/2] fix issue with insertOnDuplicate where using a Mysql keyword as a column name can cause an SQL error --- lib/Varien/Db/Adapter/Pdo/Mysql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Varien/Db/Adapter/Pdo/Mysql.php b/lib/Varien/Db/Adapter/Pdo/Mysql.php index d8e7d9a7e6752..8b8b156429bab 100644 --- a/lib/Varien/Db/Adapter/Pdo/Mysql.php +++ b/lib/Varien/Db/Adapter/Pdo/Mysql.php @@ -1885,7 +1885,7 @@ public function insertOnDuplicate($table, array $data, array $fields = array()) } } elseif (is_string($v)) { $value = sprintf('VALUES(%s)', $this->quoteIdentifier($v)); - $field = $v; + $field = $this->quoteIdentifier($v); } if ($field && $value) {