1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-17 20:01:25 +02:00

MSSQL: avoid warnings if result is invalid

This commit is contained in:
Gargaj
2014-09-19 14:41:45 +02:00
committed by Jakub Vrana
parent 0ed7b6b058
commit 0fb7260fd4

View File

@@ -66,6 +66,9 @@ if (isset($_GET["mssql"])) {
if (!$result) { if (!$result) {
$result = $this->_result; $result = $this->_result;
} }
if (!$result) {
return false;
}
if (sqlsrv_field_metadata($result)) { if (sqlsrv_field_metadata($result)) {
return new Min_Result($result); return new Min_Result($result);
} }
@@ -74,7 +77,7 @@ if (isset($_GET["mssql"])) {
} }
function next_result() { function next_result() {
return sqlsrv_next_result($this->_result); return $this->_result ? sqlsrv_next_result($this->_result) : null;
} }
function result($query, $field = 0) { function result($query, $field = 0) {