Commit 857b9500 authored by Steve Müller's avatar Steve Müller

fix CS

parent cc1aeec9
......@@ -238,21 +238,21 @@ class SQLSrvStatement implements IteratorAggregate, Statement
{
$args = func_get_args();
$fetchMode = $fetchMode ?: $this->defaultFetchMode;
if (isset(self::$fetchMap[$fetchMode])) {
$rows = sqlsrv_fetch_array($this->stmt, self::$fetchMap[$fetchMode]);
return sqlsrv_fetch_array($this->stmt, self::$fetchMap[$fetchMode]) ?: false;
}
return $rows ?: false;
} elseif ($fetchMode == PDO::FETCH_OBJ || $fetchMode == PDO::FETCH_CLASS) {
if ($fetchMode == PDO::FETCH_OBJ || $fetchMode == PDO::FETCH_CLASS) {
$className = $this->defaultFetchClass;
$ctorArgs = $this->defaultFetchClassCtorArgs;
if (count($args) >= 2) {
$className = $args[1];
$ctorArgs = (isset($args[2])) ? $args[2] : array();
}
$rows = sqlsrv_fetch_object($this->stmt, $className, $ctorArgs);
return $rows ?: false;
return sqlsrv_fetch_object($this->stmt, $className, $ctorArgs) ?: false;
}
throw new SQLSrvException("Fetch mode is not supported!");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment