--- typo3_src-4.0.5/typo3/sysext/dbal/class.ux_t3lib_db.php 2007-02-21 04:51:34.000000000 +0100 +++ class.ux_t3lib_db.php 2007-02-27 15:27:54.000000000 +0100 @@ -1268,10 +1268,16 @@ // Removing all numeric/integer keys. // A workaround because in ADOdb we would need to know what we want before executing the query... + // fe@studioneun.de: MSSQL does not support ADODB_FETCH_BOTH and always returns an assoc array + // instead. So we don't need to remove anything. if (is_array($output)) { - foreach($output as $key => $value) { + if (!$this->runningADOdbDriver('mssql')) { + foreach($output as $key => $value) if (is_integer($key)) unset($output[$key]); - elseif($value===' ' && $this->runningADOdbDriver('mssql')) $output[$key]=''; // MSSQL does not know such thing as an empty string. So it returns one space instead, which we must fix. + }else{ + // MSSQL does not know such thing as an empty string. So it returns one space instead, which we must fix. + foreach($output as $key => $value) + if($value===' ') $output[$key]=''; } } } @@ -1315,10 +1321,19 @@ // Removing all assoc. keys. // A workaround because in ADOdb we would need to know what we want before executing the query... + // fe@studioneun.de: MSSQL does not support ADODB_FETCH_BOTH and always returns an assoc array + // instead. We need to convert. if (is_array($output)) { + $arrKey = 0; foreach($output as $key => $value) { - if (!is_integer($key)) unset($output[$key]); - elseif($value===' ' && $this->runningADOdbDriver('mssql')) $output[$key]=''; // MSSQL does not know such thing as an empty string. So it returns one space instead, which we must fix. + if (!is_integer($key) && !$this->runningADOdbDriver('mssql')){ + unset($output[$key]); + }else{ + unset($output[$key]); + $output[$arrKey] = $value; + if ($value===' ') $output[$arrKey]=''; // MSSQL does not know such thing as an empty string. So it returns one space instead, which we must fix. + $arrKey++; + } } } }