summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-04-15 07:34:28 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-04-15 07:34:28 +0000
commit84c3abc232b0147ff19f7eb5afd250266c863d88 (patch)
tree9498ca1517f7ee63ff2b4a835086e72db404f6e8
parent75153a0f772628fd711ef58f704727970a87b912 (diff)
- don't send set_env() when env array is empty
git-svn-id: https://svn.roundcube.net/trunk@1305 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/program/include/rcube_json_output.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/roundcubemail/program/include/rcube_json_output.php b/roundcubemail/program/include/rcube_json_output.php
index 04d16bf92..802da2413 100644
--- a/roundcubemail/program/include/rcube_json_output.php
+++ b/roundcubemail/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));