]> git.sur5r.net Git - contagged/commitdiff
avoid deprecation warnings in PHP 5.3+
authorAndreas Gohr <gohr@cosmocode.de>
Tue, 30 Nov 2010 08:53:19 +0000 (09:53 +0100)
committerAndreas Gohr <gohr@cosmocode.de>
Tue, 30 Nov 2010 08:53:19 +0000 (09:53 +0100)
inc/init.php

index 67fbc69be22bac478ddae3ea5396183c5eb40220..be47441e0504d370deed0cbabbd4530a7d88b016 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+  if(defined('E_DEPRECATED')){ // since php 5.3
+    error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
+  }else{
+    error_reporting(E_ALL ^ E_NOTICE);
+  }
+
   require_once(dirname(__FILE__).'/config.php');
   require_once(dirname(__FILE__).'/fields.php');
   require_once(dirname(__FILE__).'/lang/en.php');