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; }