From 29d2d7a58029d4779894c17fbba866ece70ee4df Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 5 Oct 2021 10:44:48 +0200 Subject: [PATCH] fixing some conditions in the previous commit stalling InfoLog list --- api/src/Etemplate/Widget.php | 5 +++-- api/src/Etemplate/Widget/Nextmatch.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/api/src/Etemplate/Widget.php b/api/src/Etemplate/Widget.php index 58e00ea8bc..00a591f000 100644 --- a/api/src/Etemplate/Widget.php +++ b/api/src/Etemplate/Widget.php @@ -147,7 +147,8 @@ class Widget } // Reset content as we leave - if ($old_cont ?? null) { + if (isset($old_cont)) + { self::$cont = $old_cont; } } @@ -206,7 +207,7 @@ class Widget $template = $this; while($reader->moveToNextAttribute()) { - if ($reader->name != 'id' && isset($template->attr[$reader->name]) && $template->attr[$reader->name] !== $reader->value) + if ($reader->name != 'id' && (!isset($template->attr[$reader->name]) || $template->attr[$reader->name] !== $reader->value)) { if (!$cloned) { diff --git a/api/src/Etemplate/Widget/Nextmatch.php b/api/src/Etemplate/Widget/Nextmatch.php index 01acdc8625..d6ccd128c7 100644 --- a/api/src/Etemplate/Widget/Nextmatch.php +++ b/api/src/Etemplate/Widget/Nextmatch.php @@ -186,7 +186,7 @@ class Nextmatch extends Etemplate\Widget if (true) $value =& self::get_array(self::$request->content, $form_name, true); // Add favorite here so app doesn't save it in the session - if (empty($_GET['favorite'])) + if (!empty($_GET['favorite'])) { $send_value['favorite'] = $safe_name; }