Thread:Extension talk:OdbcDatabase/PHP Stack trace result upon empty result set/reply (2)

Actually, this patch is better for two reasons: --- OdbcDatabase.body.php.original	2014-12-01 18:14:08.000000000 -0500 +++ OdbcDatabase.body.php	2015-06-04 23:37:04.084804367 -0400 @@ -136,7 +136,7 @@ 				$array[$i] = odbc_result( $res, $i+1 ); } 		} else if ( $this->mRowNum <= $this->mAffectedRows ) { -			if ( $this->lastErrno ) { +			if ( ($this->mAffectedRows > 0) && $this->lastErrno ) { throw new DBUnexpectedError( $this, wfMessage( 'odbcdatabase-fetch-row-error', $this->lastErrno, htmlspecialchars( $this->lastError ) ) ); } 		}
 * the exception logic only triggers on failures
 * it handles the single row case!