From dc5e06b11284d20922b1d70a75909c42e5af75e4 Mon Sep 17 00:00:00 2001
From: Dan Goodliffe <dan@randomdan.homeip.net>
Date: Tue, 8 Jan 2019 21:18:22 +0000
Subject: Extend mythweb patch to cover count bugs

---
 www-apps/mythweb/mythweb-0.28.1-php-7.2.patch | 29 +++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

(limited to 'www-apps')

diff --git a/www-apps/mythweb/mythweb-0.28.1-php-7.2.patch b/www-apps/mythweb/mythweb-0.28.1-php-7.2.patch
index 345142b..ba8305d 100644
--- a/www-apps/mythweb/mythweb-0.28.1-php-7.2.patch
+++ b/www-apps/mythweb/mythweb-0.28.1-php-7.2.patch
@@ -19,3 +19,32 @@
      }
  
  // Load the class for this page
+--- mythweb/modules/tv/tmpl/default/detail.php	2019-01-08 21:15:23.911010631 +0000
++++ mythweb/modules/tv/tmpl/default/detail.php	2019-01-08 21:15:37.838792895 +0000
+@@ -830,7 +830,7 @@
+             </div>
+             <div class="x-jobs">
+ <?php
+-        if (count($program->jobs_possible)) {
++        if (is_array($program->jobs_possible) && count($program->jobs_possible)) {
+             echo t('Queue a job'), ':',
+                  '            <ul class="x-queue">';
+             foreach ($program->jobs_possible as $id => $job) {
+@@ -842,7 +842,7 @@
+             }
+             echo '            </ul>';
+         }
+-        if (count($program->jobs['queue'])) {
++        if (is_array($program->jobs['queue']) && count($program->jobs['queue'])) {
+             echo t('Queued jobs'), ':',
+                  '            <ul class="-queued">';
+             foreach ($program->jobs['queue'] as $job) {
+@@ -856,7 +856,7 @@
+             }
+             echo '            </ul>';
+         }
+-        if (count($program->jobs['done'])) {
++        if (is_array($program->jobs['done']) && count($program->jobs['done'])) {
+             echo t('Recently completed jobs'), ':',
+                  '            <ul class="-done">';
+             foreach ($program->jobs['done'] as $job) {
-- 
cgit v1.2.3