Try to avoid error opening Addressbook policy

This commit is contained in:
nathangray 2020-11-02 09:16:34 -07:00 committed by Hadi Nategh
parent 2b03dcfe98
commit a056b8f4cd

View File

@ -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()))
{