Use PDO::FETCH_BOTH as default. PDO::ATTR_DEFAULT_FETCH_MODE is an invalid fetch mode.
This commit fixes $stmt->fetch(); without fetch style, that returns false (at least in php 7.1). PDO::ATTR_DEFAULT_FETCH_MODE is invalid for fetch. (see http://php.net/manual/en/pdostatement.fetch.php)
Now, fetch without fetch style uses default fetch for connection or PDO::FETCH_BOTH if it is not defined.
Use
PDO::FETCH_BOTH
as default.PDO::ATTR_DEFAULT_FETCH_MODE
is an invalid fetch mode.This commit fixes
$stmt->fetch();
without fetch style, that returnsfalse
(at least in php 7.1).PDO::ATTR_DEFAULT_FETCH_MODE
is invalid for fetch. (see http://php.net/manual/en/pdostatement.fetch.php)Now,
fetch
without fetch style uses default fetch for connection orPDO::FETCH_BOTH
if it is not defined.