[BUGFIX] E_DEPRECATED does not exist in PHP 5.2
authorIvan Kartolo <ivan.kartolo@dkd.de>
Wed, 4 Jul 2012 14:36:45 +0000 (16:36 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Thu, 5 Jul 2012 16:11:58 +0000 (18:11 +0200)
Because TYPO3 4.5.x should also work on PHP 5.2, the E_DEPRECATED constant
must be removed, since it produces notices.

Change-Id: Idb0e7ffb327a44088b966e04008d8efb03555b3b
Fixes: #38645
Releases: 4.5
Reviewed-on: http://review.typo3.org/12612
Reviewed-by: Philipp Gampe
Reviewed-by: Markus Klein
Reviewed-by: Ivan Dharma Kartolo
Tested-by: Ivan Dharma Kartolo
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
index.php
typo3/init.php
typo3/install/index.php
typo3/sysext/rtehtmlarea/mod4/select_image.php
typo3/sysext/rtehtmlarea/mod5/user.php
typo3/sysext/rtehtmlarea/mod6/parse_html.php
typo3/thumbs.php

index 66e7c86..dc8fd35 100644 (file)
--- a/index.php
+++ b/index.php
 // Set error reporting
 // *******************************
 
-error_reporting(E_ALL & ~(E_STRICT | E_NOTICE | E_DEPRECATED));
+if (defined('E_DEPRECATED')) {
+       error_reporting(E_ALL & ~(E_STRICT | E_NOTICE | E_DEPRECATED));
+} else {
+       error_reporting(E_ALL ^ E_NOTICE);
+}
 
 // ******************
 // Constants defined
index 426e9bb..886cc05 100644 (file)
@@ -66,7 +66,11 @@ if (version_compare(phpversion(), '5.2', '<'))       die ('TYPO3 requires PHP 5.2.0 or
 // *******************************
 // Set error reporting
 // *******************************
-error_reporting(E_ALL & ~(E_STRICT | E_NOTICE | E_DEPRECATED));
+if (defined('E_DEPRECATED')) {
+       error_reporting(E_ALL & ~(E_STRICT | E_NOTICE | E_DEPRECATED));
+} else {
+       error_reporting(E_ALL ^ E_NOTICE);
+}
 
 // *******************************
 // Prevent any unwanted output that may corrupt AJAX/compression. Note: this does
index ff1080d..512dc25 100755 (executable)
 // Insert some security here, if you don't trust the Install Tool Password:
 // **************************************************************************
 
-error_reporting(E_ALL & ~(E_STRICT | E_NOTICE | E_DEPRECATED));
+if (defined('E_DEPRECATED')) {
+       error_reporting(E_ALL & ~(E_STRICT | E_NOTICE | E_DEPRECATED));
+} else {
+       error_reporting(E_ALL ^ E_NOTICE);
+}
 
 $PATH_thisScript = str_replace('//', '/', str_replace('\\', '/',
        (PHP_SAPI == 'fpm-fcgi' || PHP_SAPI == 'cgi' || PHP_SAPI == 'isapi' || PHP_SAPI == 'cgi-fcgi') &&
index dcaf45b..e3becc4 100644 (file)
  * $Id$  *
  */
 
-error_reporting(E_ALL & ~(E_STRICT | E_NOTICE));
+if (defined('E_DEPRECATED')) {
+           error_reporting(E_ALL & ~(E_STRICT | E_NOTICE | E_DEPRECATED));
+} else {
+           error_reporting(E_ALL ^ E_NOTICE);
+}
 unset($MCONF);
 require('conf.php');
 require($BACK_PATH.'init.php');
@@ -114,4 +118,4 @@ $SOBE = t3lib_div::makeInstance('tx_rtehtmlarea_SC_select_image');
 $SOBE->main();
 $SOBE->printContent();
 
-?>
+?>
\ No newline at end of file
index 7a802ff..90ca883 100644 (file)
  * $Id$  *
  */
 
-error_reporting(E_ALL & ~(E_STRICT | E_NOTICE));
+if (defined('E_DEPRECATED')) {
+           error_reporting(E_ALL & ~(E_STRICT | E_NOTICE | E_DEPRECATED));
+} else {
+           error_reporting(E_ALL ^ E_NOTICE);
+}
 unset($MCONF);
 require('conf.php');
 require($BACK_PATH.'init.php');
index f903b3a..f969cd1 100644 (file)
  * $Id$  *
  */
 
-error_reporting(E_ALL & ~(E_STRICT | E_NOTICE));
+if (defined('E_DEPRECATED')) {
+           error_reporting(E_ALL & ~(E_STRICT | E_NOTICE | E_DEPRECATED));
+} else {
+           error_reporting(E_ALL ^ E_NOTICE);
+}
 unset($MCONF);
 require ('conf.php');
 require ($BACK_PATH.'init.php');
index 81fefa9..cd70f7b 100644 (file)
 // Set error reporting
 // *******************************
 
-error_reporting(E_ALL & ~(E_STRICT | E_NOTICE | E_DEPRECATED));
+if (defined('E_DEPRECATED')) {
+       error_reporting(E_ALL & ~(E_STRICT | E_NOTICE | E_DEPRECATED));
+} else {
+       error_reporting(E_ALL ^ E_NOTICE);
+}
 
 define('PATH_thisScript', str_replace('//', '/', str_replace('\\', '/',
        (PHP_SAPI == 'fpm-fcgi' || PHP_SAPI == 'cgi' || PHP_SAPI == 'isapi' || PHP_SAPI == 'cgi-fcgi') &&