From 1064cdeff203f1d8db82e1e9037617c06d8992ee Mon Sep 17 00:00:00 2001 From: nathangray Date: Mon, 2 Nov 2020 09:16:34 -0700 Subject: [PATCH] Try to avoid error opening Addressbook policy --- admin/inc/class.admin_cmd.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/inc/class.admin_cmd.inc.php b/admin/inc/class.admin_cmd.inc.php index 3e2456285b..a1e90a0308 100644 --- a/admin/inc/class.admin_cmd.inc.php +++ b/admin/inc/class.admin_cmd.inc.php @@ -1340,9 +1340,9 @@ abstract class admin_cmd { static $tpl = null; // some caching to not instanciate it twice - if (!isset($tpl)) + $name = $this->get_etemplate_name(); + if (!isset($tpl) || $tpl->id !== $name) { - $name = $this->get_etemplate_name(); if (empty($name)) { $tpl = false; @@ -1363,7 +1363,7 @@ abstract class admin_cmd */ function get_change_labels() { - $labels = []; + $labels = []; $label = null; if (($tpl = $this->get_etemplate())) {