Browse Source

Use isset instead of double boolean cast.

Mark Story 11 years ago
parent
commit
bc5dcbe9b9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Database/Statement/StatementDecorator.php

+ 1 - 1
src/Database/Statement/StatementDecorator.php

@@ -276,7 +276,7 @@ class StatementDecorator implements StatementInterface, \Countable, \IteratorAgg
 		if ($column && $this->columnCount()) {
 			$row = $this->fetch('assoc');
 		}
-		if ($column && $row) {
+		if (isset($row[$column])) {
 			return $row[$column];
 		}
 		return $this->_driver->lastInsertId($table, $column);