Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Applying PHP 5.3 compatibility patch from. Please update your config/…

…core.php, webroot/index.php and webroot/test.php accordingly.
  • Loading branch information...
commit a5c00de3bd51b4c509aafec424198f3d3557a92f 1 parent b75779e
@nateabele nateabele authored markstory committed
View
5 app/config/core.php
@@ -171,6 +171,11 @@
Configure::write('Acl.classname', 'DbAcl');
Configure::write('Acl.database', 'default');
/**
+ * If you are on PHP 5.3 uncomment this line and correct your server timezone
+ * to fix the date & time related errors.
+ */
+ //date_default_timezone_set('UTC');
+/**
*
* Cache Engine Configuration
* Default settings provided below
View
7 app/webroot/index.php
@@ -57,6 +57,13 @@
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
define('CAKE_CORE_INCLUDE_PATH', ROOT);
}
+/**
+ * PHP 5.3 raises many notices in bootstrap.
+ */
+ if (!defined('E_DEPRECATED')) {
+ define('E_DEPRECATED', 8192);
+ }
+ error_reporting(E_ALL & ~E_DEPRECATED);
/**
* Editing below this line should NOT be necessary.
View
9 app/webroot/test.php
@@ -24,7 +24,14 @@
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
*/
-error_reporting(E_ALL);
+/**
+ * PHP 5.3 raises many notices in bootstrap.
+ */
+if (!defined('E_DEPRECATED')) {
+ define('E_DEPRECATED', 8192);
+}
+error_reporting(E_ALL & ~E_DEPRECATED);
+
set_time_limit(0);
ini_set('memory_limit','128M');
ini_set('display_errors', 1);
View
5 cake/console/libs/templates/skel/config/core.php
@@ -171,6 +171,11 @@
Configure::write('Acl.classname', 'DbAcl');
Configure::write('Acl.database', 'default');
/**
+ * If you are on PHP 5.3 uncomment this line and correct your server timezone
+ * to fix the date & time related errors.
+ */
+ //date_default_timezone_set('UTC');
+/**
*
* Cache Engine Configuration
* Default settings provided below
View
7 cake/console/libs/templates/skel/webroot/index.php
@@ -57,6 +57,13 @@
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
define('CAKE_CORE_INCLUDE_PATH', ROOT);
}
+/**
+ * PHP 5.3 raises many notices in bootstrap.
+ */
+ if (!defined('E_DEPRECATED')) {
+ define('E_DEPRECATED', 8192);
+ }
+ error_reporting(E_ALL & ~E_DEPRECATED);
/**
* Editing below this line should not be necessary.
View
9 cake/console/libs/templates/skel/webroot/test.php
@@ -24,7 +24,14 @@
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
*/
-error_reporting(E_ALL);
+/**
+ * PHP 5.3 raises many notices in bootstrap.
+ */
+if (!defined('E_DEPRECATED')) {
+ define('E_DEPRECATED', 8192);
+}
+error_reporting(E_ALL & ~E_DEPRECATED);
+
set_time_limit(0);
ini_set('memory_limit','128M');
ini_set('display_errors', 1);
View
2  cake/libs/configure.php
@@ -292,7 +292,7 @@ function write($config, $value = null) {
if (isset($config['debug'])) {
if ($_this->debug) {
- error_reporting(E_ALL);
+ error_reporting(E_ALL & ~E_DEPRECATED);
if (function_exists('ini_set')) {
ini_set('display_errors', 1);
View
2  cake/libs/debugger.php
@@ -163,7 +163,7 @@ function log($var, $level = LOG_DEBUG) {
* @access public
*/
function handleError($code, $description, $file = null, $line = null, $context = null) {
- if (error_reporting() == 0 || $code === 2048) {
+ if (error_reporting() == 0 || $code === 2048 || $code === 8192) {
return;
}
Please sign in to comment.
Something went wrong with that request. Please try again.