summaryrefslogtreecommitdiff
path: root/program/include/rcube_json_output.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-04-15 07:34:28 +0000
committeralecpl <alec@alec.pl>2008-04-15 07:34:28 +0000
commit47fab0a48ee8fbce32c8d50eb26fb8f9779a5446 (patch)
tree1310158bff1a1d5654914c2fbe9e601366c88643 /program/include/rcube_json_output.php
parent54d830fa44e3e387b06a19c8fb9daf63d0994941 (diff)
- don't send set_env() when env array is empty
Diffstat (limited to 'program/include/rcube_json_output.php')
-rw-r--r--program/include/rcube_json_output.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/program/include/rcube_json_output.php b/program/include/rcube_json_output.php
index 04d16bf92..802da2413 100644
--- a/program/include/rcube_json_output.php
+++ b/program/include/rcube_json_output.php
@@ -211,7 +211,10 @@ class rcube_json_output
*/
private function get_js_commands()
{
- $out = 'this.set_env('.json_serialize($this->env).");\n";
+ $out = '';
+
+ if (sizeof($this->env))
+ $out .= 'this.set_env('.json_serialize($this->env).");\n";
foreach($this->texts as $name => $text) {
$out .= sprintf("this.add_label('%s', '%s');\n", $name, JQ($text));