diff --git a/src/Database/Statement/StatementDecorator.php b/src/Database/Statement/StatementDecorator.php index 4840d9c15c3..23e67e62802 100644 --- a/src/Database/Statement/StatementDecorator.php +++ b/src/Database/Statement/StatementDecorator.php @@ -276,7 +276,7 @@ public function lastInsertId($table = null, $column = null) { if ($column && $this->columnCount()) { $row = $this->fetch('assoc'); } - if ($column && $row) { + if (isset($row[$column])) { return $row[$column]; } return $this->_driver->lastInsertId($table, $column);