From 92d163cb055d5e0d6c78ebbf03304f47fbf68314 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 29 Oct 2010 11:33:53 +0000 Subject: [PATCH] Backwards-compatiblity must be turned off --- inc/classes/cachesystem.class.php | 5 +++++ inc/libs/security_functions.php | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/inc/classes/cachesystem.class.php b/inc/classes/cachesystem.class.php index 41a5cdb3b7..b422b47ef0 100644 --- a/inc/classes/cachesystem.class.php +++ b/inc/classes/cachesystem.class.php @@ -525,6 +525,11 @@ class CacheSystem { return $this->readable[$this->name]; } + // Cloning not allowed + function __clone () { + // Please do not clone this class + debug_report_bug(__METHOD__, __LINE__, 'Cloning of this class is not allowed.'); + } } // END - class // [EOF] diff --git a/inc/libs/security_functions.php b/inc/libs/security_functions.php index fc61bdf360..15619b5072 100644 --- a/inc/libs/security_functions.php +++ b/inc/libs/security_functions.php @@ -136,6 +136,12 @@ function detectPhpCaching () { ini_set('magic_quotes_runtime', false); ini_set('magic_quotes_gpc', false); // This may not work on some systems +// No compatibility with Zend Engine 1, else an error like 'Implicit cloning' +// will be produced. +if (phpversion() >= '5.0') { + ini_set('zend.ze1_compatibility_mode', 'Off'); +} // END - if + // Check if important arrays are found and define them if missing if (!isset($_SERVER)) { global $_SERVER; -- 2.39.5