Regression #14500
closedPHP Error when viewing Traffic Graphs in ``iftop`` mode
100%
Description
[22-Jun-2023 00:52:59 US/Pacific] PHP Fatal error:  Uncaught TypeError: format_number(): Argument #1 ($num) must be of type int, string given, called in /usr/local/pfSense/include/www/bandwidth_by_ip.inc on line 172 and defined in /etc/inc/util.inc:2276
Stack trace:
#0 /usr/local/pfSense/include/www/bandwidth_by_ip.inc(172): format_number('', 2)
#1 /usr/local/www/bandwidth_by_ip.php(36): printBandwidth('lan', 'local', 'out', '', 'iftop')
#2 {main}
  thrown in /etc/inc/util.inc on line 2276
Files
Related issues
      
      Updated by Jim Pingle over 2 years ago
      
    
    - Tracker changed from Bug to Regression
 - Subject changed from php errors with traffic graphing to PHP Error when viewing Traffic Graphs in ``iftop`` mode
 - Assignee set to Christian McDonald
 - Target version set to CE-Next
 - Plus Target Version set to 23.09
 
I had fixed this in #14236 but then it regressed when the function was rewritten in fd30ce6a3bddfbc88560952153dc4c2fdefbe341
      
      Updated by Jim Pingle over 2 years ago
      
    
    - Related to Bug #14236: PHP Error when viewing Traffic Graphs in ``iftop`` mode added
 
      
      Updated by Jonathan Lee over 2 years ago
      
    
    @Jim Pingle
Thanks for looking into this. I appreciate all you do.
      
      Updated by Lev Prokofev over 2 years ago
      
    
    Can't reproduce the issue on 23.05.1 and on 23.09-DEVELOPMENT (amd64)
built on Wed Jul 19 20:12:23 UTC 2023
      
      Updated by Jim Pingle about 2 years ago
      
    
    - Status changed from New to In Progress
 - Assignee changed from Christian McDonald to Jim Pingle
 - Target version changed from CE-Next to 2.8.0
 
      
      Updated by Jim Pingle about 2 years ago
      
    
    - Status changed from In Progress to Feedback
 - % Done changed from 0 to 100
 
Applied in changeset 71f360de9043c64a999c6b47003099ee59a5a132.
      
      Updated by Jordan G about 2 years ago
      
    
    testing with above changeset applied via system_patches package running 23.05.1, I am not seeing any crashes or php errors when using traffic graphs in iftop mode.
      
      Updated by Jim Pingle about 2 years ago
      
    
    - Status changed from Feedback to Resolved
 
      
      Updated by Jim Pingle almost 2 years ago
      
    
    - Target version changed from 2.8.0 to 2.7.1