From 5717ae188940fe8d3f027d2d20dd2c12f90089c6 Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Mon, 29 Feb 2016 16:27:17 +0000 Subject: [PATCH] (retrofit from trunk) Optimization/bug (!): Never use the whole object as a placeholder in ApplyParams !! SVN:2.1.0[3934] --- core/metamodel.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/metamodel.class.php b/core/metamodel.class.php index 8e53fa8c94..de4e3c624f 100644 --- a/core/metamodel.class.php +++ b/core/metamodel.class.php @@ -5432,9 +5432,11 @@ abstract class MetaModel { // Some environment parameters are objects, we just need scalars if (is_object($replace)) continue; - - $aSearches[] = '$'.$sSearch.'$'; - $aReplacements[] = (string) $replace; + else + { + $aSearches[] = '$'.$sSearch.'$'; + $aReplacements[] = (string) $replace; + } } return str_replace($aSearches, $aReplacements, $aInput); }