git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
page: replace output caching by article object
[minimedit.git]
/
database.inc.php
diff --git
a/database.inc.php
b/database.inc.php
index 6a82507649612a5739bf3fb396062fb1cae2e686..218335814bebf8e993aeb034449d7dc17efae940 100644
(file)
--- a/
database.inc.php
+++ b/
database.inc.php
@@
-8,7
+8,10
@@
class DB
function __construct($config, $options = [])
{
function __construct($config, $options = [])
{
- $options += [ PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION ];
+ $options += [
+ PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
+ PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ,
+ ];
$this->dbh = new PDO($config, NULL, NULL, $options);
}
$this->dbh = new PDO($config, NULL, NULL, $options);
}