Skip to content

Commit

Permalink
config.php: make development setting (debugging etc) toggleable
Browse files Browse the repository at this point in the history
git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/trunk@99 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641
  • Loading branch information
Dave Goodwin committed Sep 28, 2011
1 parent a1f9f2e commit 55464bd
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions config.php
Expand Up @@ -19,12 +19,21 @@
// Same as error_reporting(E_ALL);
global $xerte_toolkits_site;

// Error reporting fix - please set
//ini_set('error_reporting', 0);
// Change this to FALSE for production sites.
global $development;
$development = true;

ini_set('error_reporting', 0);
if($development) {
ini_set('error_reporting', E_ALL);
}

if(!function_exists('_debug')) {
function _debug($string) {
file_put_contents('/tmp/debug.log', date('Y-m-d H:i:s ') . $string . "\n", FILE_APPEND);
global $development;
if(isset($development) && $development) {
file_put_contents('/tmp/debug.log', date('Y-m-d H:i:s ') . $string . "\n", FILE_APPEND);
}
}
}

Expand Down

0 comments on commit 55464bd

Please sign in to comment.