mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Bugtracker #4108 - workaround for bug in Zend Optimiser 3.3.0 with PHP 5.2.4 - crashes on '::' in defined()
This commit is contained in:
@@ -11,9 +11,9 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/e_parse_class.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/e_parse_class.php,v $
|
||||||
| $Revision: 1.15 $
|
| $Revision: 1.16 $
|
||||||
| $Date: 2007-09-09 07:05:06 $
|
| $Date: 2007-10-04 19:08:38 $
|
||||||
| $Author: e107coders $
|
| $Author: e107steved $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
if (!defined('e107_INIT')) { exit; }
|
if (!defined('e107_INIT')) { exit; }
|
||||||
@@ -469,7 +469,8 @@ class e_parse
|
|||||||
$fromadmin = $opts['fromadmin'];
|
$fromadmin = $opts['fromadmin'];
|
||||||
|
|
||||||
// Convert defines(constants) within text. eg. Lan_XXXX - must be the entire text string (i.e. not embedded)
|
// Convert defines(constants) within text. eg. Lan_XXXX - must be the entire text string (i.e. not embedded)
|
||||||
if ($opts['defs'] && (strlen($text) < 25) && defined(trim($text)))
|
// The check for '::' is a workaround for a bug in the Zend Optimiser 3.3.0 and PHP 5.2.4 combination - causes crashes if '::' in site name
|
||||||
|
if ($opts['defs'] && (strlen($text) < 25) && ((strpos($text,'::') === FALSE) && defined(trim($text))))
|
||||||
{
|
{
|
||||||
return constant(trim($text));
|
return constant(trim($text));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user