From 09c69286fb6264cf326bdfbc26516b727d2b6cec Mon Sep 17 00:00:00 2001 From: Klimov Paul Date: Thu, 15 Aug 2013 10:11:37 +0300 Subject: [PATCH] CClientScript::renderScriptBatch() has been improved to sort html options only if they are specified. --- framework/web/CClientScript.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/web/CClientScript.php b/framework/web/CClientScript.php index 151cbf091..905cd0255 100644 --- a/framework/web/CClientScript.php +++ b/framework/web/CClientScript.php @@ -318,13 +318,13 @@ class CClientScript extends CApplicationComponent $scriptContent = $scriptValue['content']; unset($scriptValue['content']); $scriptHtmlOptions = $scriptValue; + ksort($scriptHtmlOptions); } else { $scriptContent = $scriptValue; $scriptHtmlOptions = array(); } - ksort($scriptHtmlOptions); $key=serialize($scriptHtmlOptions); $scriptBatches[$key]['htmlOptions']=$scriptHtmlOptions; $scriptBatches[$key]['scripts'][]=$scriptContent;