[mythtv-commits] Ticket #13533: Warning at /usr/share/mythtv/bindings/php/MythBackend.php, line 194:

MythTV noreply at mythtv.org
Fri Dec 6 10:03:29 UTC 2019


#13533: Warning at /usr/share/mythtv/bindings/php/MythBackend.php, line 194:
--------------------------------------+-----------------------
     Reporter:  kingmiro              |      Owner:  gigem
         Type:  Bug Report - General  |     Status:  new
     Priority:  major                 |  Milestone:  unknown
    Component:  MythTV - Scheduling   |    Version:  v30-fixes
     Severity:  medium                |   Keywords:
Ticket locked:  0                     |
--------------------------------------+-----------------------
 kingmiro at mythxxx:~$ mythbackend --version
 Please attach all output as a file in bug reports.
 MythTV Version : v30.0
 MythTV Branch :
 Network Protocol : 91
 Library API : 30.20181231-1
 QT Version : 5.9.5
 Options compiled in:

 ----

 Problem:
 When scheduling a new recording from the (for example) Listings, I am
 always getting the Error message at the top:

  Warning at /usr/share/mythtv/bindings/php/MythBackend.php, line 194:
  !!NoTrans: count(): Parameter must be an array or an object that
 implements Countable!!

 ----
 Info:
 The issue is appearing, but still the schedule can be set.

 ----
 Solution:
 I have tested this solution, that was provided by daraden in this thread:
 https://forum.mythtv.org/viewtopic.php?t=2815


 I may have found a possible solution to this issue. looks like replacing
 line 194

 Code: Select all

         $count = count($records);

 with

 Code: Select all

        if (is_array($records)) $count = count($records);
        else $count = 0;

 may resolve this issue in PHP 7.2. Not a PHP programmer so I'm not aware
 of any issues with implementing this solution.



 After modifying this line, I do not get the Error presented any more, but
 with every update the file:
 /usr/share/mythtv/bindings/php/MythBackend.php
 is getting overwritten and I have to add it again.


 Please add this quick fix to the code, so it gets fixed with a future
 update.


 Thanks a lot!

 Cheers,
 Miro

-- 
Ticket URL: <https://code.mythtv.org/trac/ticket/13533>
MythTV <http://www.mythtv.org>
MythTV Media Center


More information about the mythtv-commits mailing list