Merge pull request #1398 from gintsmurans/develop

Change error_reporting(0) to ini_set('display_errors', 0);
diff --git a/index.php b/index.php
index ad98013..c379f72 100644
--- a/index.php
+++ b/index.php
@@ -52,20 +52,21 @@
  * By default development will show errors but testing and live will hide them.
  */
 
-if (defined('ENVIRONMENT'))
+switch (ENVIRONMENT)
 {
-	switch (ENVIRONMENT)
-	{
-		case 'development':
-			error_reporting(-1);
-		break;
-		case 'testing':
-		case 'production':
-			error_reporting(0);
-		break;
-		default:
-			exit('The application environment is not set correctly.');
-	}
+	case 'development':
+		error_reporting(-1);
+		ini_set('display_errors', 1);
+	break;
+
+	case 'testing':
+	case 'production':
+		error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_STRICT);
+		ini_set('display_errors', 0);
+	break;
+
+	default:
+		exit('The application environment is not set correctly.');
 }
 
 /*
@@ -268,4 +269,4 @@
 require_once BASEPATH.'core/CodeIgniter.php';
 
 /* End of file index.php */
-/* Location: ./index.php */
\ No newline at end of file
+/* Location: ./index.php */