From fc80ed598f1db2b8b4de6aeb0917a3f7391ec215 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 24 Aug 2008 10:56:53 +0200 Subject: avoid deprected warnings in php5.3 FS#1464 darcs-hash:20080824085653-7ad00-44925f90b286493b9b55d1ace59136a676786faf.gz --- inc/init.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'inc/init.php') diff --git a/inc/init.php b/inc/init.php index aa0748207..58056083d 100644 --- a/inc/init.php +++ b/inc/init.php @@ -23,8 +23,15 @@ if (!defined('DOKU_E_LEVEL') && @file_exists(DOKU_CONF.'report_e_all')) { define('DOKU_E_LEVEL', E_ALL); } - if (!defined('DOKU_E_LEVEL')) { error_reporting(E_ALL ^ E_NOTICE); } - else { error_reporting(DOKU_E_LEVEL); } + if (!defined('DOKU_E_LEVEL')) { + if(defined('E_DEPRECATED')){ // since php 5.3 + error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED); + }else{ + error_reporting(E_ALL ^ E_NOTICE); + } + } else { + error_reporting(DOKU_E_LEVEL); + } // init memory caches global $cache_revinfo; $cache_revinfo = array(); -- cgit v1.2.3