From a056b8f4cd056570f6e741b125433f8f9f406ddf 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 b95b98c965..da3f20c06d 100644 --- a/admin/inc/class.admin_cmd.inc.php +++ b/admin/inc/class.admin_cmd.inc.php @@ -1336,9 +1336,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; @@ -1359,7 +1359,7 @@ abstract class admin_cmd */ function get_change_labels() { - $labels = []; + $labels = []; $label = null; if (($tpl = $this->get_etemplate())) {