[mythtv-commits] Ticket #13260: Mythweb throws php warning on 'recorded programmes' screen under php7.2

MythTV noreply at mythtv.org
Thu May 3 15:16:34 UTC 2018


#13260: Mythweb throws php warning on 'recorded programmes' screen under php7.2
------------------------------+-------------------------------------
 Reporter:  george.poulson@…  |          Owner:  Stuart Auchterlonie
     Type:  Patch - Bug Fix   |         Status:  new
 Priority:  minor             |      Milestone:  needs_triage
Component:  Plugin - MythWeb  |        Version:  v29-fixes
 Severity:  low               |     Resolution:
 Keywords:                    |  Ticket locked:  0
------------------------------+-------------------------------------

Comment (by Gary Buhrmaster):

 FWIW, there is also a define of those variables a few lines previously
 which would be invoked if one has php-gmp available.

 So I believe (untested) the more complete fix would be:

 {{{
 diff --git a/modules/tv/recorded.php b/modules/tv/recorded.php
 index 70c04359..d374c034 100644
 --- a/modules/tv/recorded.php
 +++ b/modules/tv/recorded.php
 @@ -179,14 +179,14 @@
      if (function_exists('gmp_mul')) {
      // GMP functions should work better with 64 bit numbers.
          $size = gmp_mul('1024', $size);
 -        define(disk_size, gmp_strval($size));
 +        define('disk_size', gmp_strval($size));
          $size = gmp_mul('1024', $used);
 -        define(disk_used, gmp_strval($size));
 +        define('disk_used', gmp_strval($size));
      }
      else {
      // This is inaccurate, but it's the best we can get without GMP.
 -        define(disk_size, ($size * 1024));
 -        define(disk_used, ($used * 1024));
 +        define('disk_size', ($size * 1024));
 +        define('disk_used', ($used * 1024));
      }

  // Load the class for this page
 }}}

-- 
Ticket URL: <https://code.mythtv.org/trac/ticket/13260#comment:1>
MythTV <http://www.mythtv.org>
MythTV Media Center


More information about the mythtv-commits mailing list