[BUGFIX] MSSQL native driver for ADOdb returns erroneous message 69/39069/3
authorXavier Perseguers <xavier@typo3.org>
Thu, 30 Apr 2015 08:15:33 +0000 (10:15 +0200)
committerAndreas Fernandez <andreas.fernandez@aspedia.de>
Thu, 30 Apr 2015 08:41:12 +0000 (10:41 +0200)
When no errors are found in a query, the MSSQL native driver for ADOdb
returns an invalid error message "No errors found" instead of an empty
string. This causes TYPO3 to take the non-empty string as an actual
error.

Change-Id: I09474747cd4733576464792d5d59212e87778e8a
Resolves: #66674
Releases: master, 6.2
Reviewed-on: http://review.typo3.org/39069
Reviewed-by: Stephan GroƟberndt <stephan@grossberndt.de>
Reviewed-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Tested-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
typo3/sysext/adodb/Documentation/Index.rst
typo3/sysext/adodb/Documentation/typo3-adodb.diff
typo3/sysext/adodb/adodb/drivers/adodb-mssqlnative.inc.php

index 35f1977..fbd1478 100644 (file)
@@ -18,11 +18,13 @@ updated to upstream.
 - ADOdb: Invalid override method signature (48034_) (Solved in 5.20-dev [2]_)
 - ADOdb: Set charset properly (61738_)
 - EXT:adodb: Table names in ALTER TABLE broken (63659_)
+- MSSQL native driver for ADOdb returns erroneous message (66674_)
 
 .. [2] https://github.com/ADOdb/ADOdb/commit/85f05a98974ea85ecae943faf230a27afdbaa746
 .. _48034: https://forge.typo3.org/issues/48034
 .. _61738: https://forge.typo3.org/issues/61738
 .. _63659: https://forge.typo3.org/issues/63659
+.. _66674: https://forge.typo3.org/issues/66674
 
 
 Diff
index b1ad640..b41b529 100644 (file)
@@ -193,16 +193,29 @@ index 81fb016..5ff76b9 100644
 @@ -67,13 +67,13 @@ class ADODB2_sqlite extends ADODB_DataDict {
                return $suffix;
        }
+
 -      function AlterColumnSQL($tabname, $flds)
 +      function AlterColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
        {
                if ($this->debug) ADOConnection::outp("AlterColumnSQL not supported natively by SQLite");
                return array();
        }
+
 -      function DropColumnSQL($tabname, $flds)
 +      function DropColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
        {
                if ($this->debug) ADOConnection::outp("DropColumnSQL not supported natively by SQLite");
                return array();
+diff --git a/drivers/adodb-mssqlnative.inc.php b/drivers/adodb-mssqlnative.inc.php
+index b10d555..21cfc69 100644
+--- a/drivers/adodb-mssqlnative.inc.php
++++ b/drivers/adodb-mssqlnative.inc.php
+@@ -459,7 +459,7 @@ class ADODB_mssqlnative extends ADOConnection {
+                               $this->_errorMsg .= "Message: ".$arrError[ 'message']."\n";
+                       }
+               } else {
+-                      $this->_errorMsg = "No errors found";
++                      $this->_errorMsg = '';
+               }
+               return $this->_errorMsg;
+       }
index b10d555..21cfc69 100644 (file)
@@ -459,7 +459,7 @@ class ADODB_mssqlnative extends ADOConnection {
                                $this->_errorMsg .= "Message: ".$arrError[ 'message']."\n";
                        }
                } else {
-                       $this->_errorMsg = "No errors found";
+                       $this->_errorMsg = '';
                }
                return $this->_errorMsg;
        }