From 47fab0a48ee8fbce32c8d50eb26fb8f9779a5446 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Tue, 15 Apr 2008 03:34:28 -0400
Subject: [PATCH] - don't send set_env() when env array is empty
---
program/include/rcube_json_output.php | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/program/include/rcube_json_output.php b/program/include/rcube_json_output.php
index 04d16bf..802da24 100644
--- a/program/include/rcube_json_output.php
+++ b/program/include/rcube_json_output.php
@@ -211,7 +211,10 @@
*/
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));
--
Gitblit v1.9.1