From d194928e94a64b9bcb3fbe92fb4b9914a761347d Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Wed, 20 Jan 2010 21:54:15 +0000 Subject: [PATCH] MDL-21402 fixed nasty regression :-D --- lib/ajax/ajaxlib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ajax/ajaxlib.php b/lib/ajax/ajaxlib.php index bcf4f01314e..2e85b0e39ab 100644 --- a/lib/ajax/ajaxlib.php +++ b/lib/ajax/ajaxlib.php @@ -1207,7 +1207,7 @@ class required_data_for_js extends required_js_code { public function __construct(page_requirements_manager $manager, $variable, $data) { parent::__construct($manager); $this->variable = $variable; - $this->data = json_encode($data); + $this->data = $data; // json_encode immediately, so that if $data is an object (and therefore was // passed in by reference) we get the data at the time the call was made, and // not whatever the data happened to be when this is output.