aboutsummaryrefslogtreecommitdiff
path: root/conf.php
diff options
context:
space:
mode:
authorCamil Staps2016-08-01 08:04:48 +0200
committerCamil Staps2016-08-01 08:10:55 +0200
commit3393995db8c3f191f064d2f0729b1af5fb889ee6 (patch)
tree01c3619ebbd4e1d789b246e34d6f1885af5c1f04 /conf.php
parentImplement $relatively for formatting dates (diff)
Easier accessor/mutator in Model; refreshing braintree statuses
Diffstat (limited to 'conf.php')
-rw-r--r--conf.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/conf.php b/conf.php
index 9085b1e..4754a6d 100644
--- a/conf.php
+++ b/conf.php
@@ -33,6 +33,8 @@ ini_set('display_errors', 0);
set_include_path(dirname(__FILE__) . PATH_SEPARATOR . get_include_path());
+require_once('conf.private.php');
+
spl_autoload_register(function ($pClass) {
$path = dirname(__FILE__) . "/classes/$pClass.php";
if (file_exists($path)) {
@@ -40,11 +42,11 @@ spl_autoload_register(function ($pClass) {
}
});
-require_once('conf.private.php');
-
try {
$_pdo = new PDO("mysql:host=".DB_HOST.";port=".DB_PORT.";dbname=".DB_NAME.";charset=utf8", DB_USER, DB_PASS);
$_pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+ $_pdo->setAttribute(PDO::ATTR_ORACLE_NULLS, PDO::NULL_NATURAL);
+ $_pdo->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false);
} catch (PDOException $e) {
die("Down until PDO error fixed.");
}