Permalink
Browse files

Rather than having a try/catch in every JethroDB method, allow except…

…ions to be thrown and caught elsewhere. Move the DSN-sniffing code from all the index files etc into a single place in Jethro DB. Also, turn on strict standards mode.
  • Loading branch information...
tbar0970
tbar0970 committed Jul 12, 2017
1 parent 14790f3 commit da70d7bb480d464a7d42e0693d0a0d72bf6e3820
Showing with 268 additions and 362 deletions.
  1. +2 −2 include/init.php
  2. +255 −213 include/jethrodb.php
  3. +3 −19 index.php
  4. +1 −36 members/index.php
  5. +2 −16 public/index.php
  6. +1 −15 scripts/date_reminder.php
  7. +1 −15 scripts/fix_reports.php
  8. +1 −16 scripts/mailchimp_sync.php
  9. +1 −14 scripts/migrate_settings.php
  10. +1 −16 scripts/task_reminder.php
View
@@ -13,7 +13,7 @@
});
// set error level such that we cope with PHP versions before and after 5.3 when E_DEPRECATED was introduced.
$error_level = defined('E_DEPRECATED') ? (E_ALL & ~constant('E_DEPRECATED') & ~constant('E_STRICT')) : E_ALL;
$error_level = defined('E_DEPRECATED') ? (E_ALL & ~constant('E_DEPRECATED') /*& ~constant('E_STRICT')*/) : E_ALL;
error_reporting($error_level);
@ini_set('display_errors', 1);
@@ -45,7 +45,7 @@
// Set up the DB
require_once JETHRO_ROOT .'/include/jethrodb.php';
$GLOBALS['db'] = new JethroDB(DSN, DB_USERNAME,DB_PASSWORD);
JethroDB::init(ifdef('DB_MODE', 'PRIVATE'));
//SET MySQL session variables to account for strict mode
if (defined('STRICT_MODE_FIX') && STRICT_MODE_FIX) {
Oops, something went wrong.

0 comments on commit da70d7b

Please sign in to comment.