systemart / rtgui

Automatically exported from code.google.com/p/rtgui
0 stars 0 forks source link

json.php - Keep the error console clear #62

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
After looking through the error console, it was filled with complaints from
PHP when no torrents were loaded.

<b>Warning</b>:  Invalid argument supplied for foreach() in
<b>/var/www/rtorrent/rtgui-0.2.6/json.php</b> on line <b>28</b><br /> 

Simple enough to fix, just ensure $data isn't null:

// PHP complains if data isn't set; check to keep error console clear.
if ($data) {
   foreach($data as $subitem) {
...
   }
}

Original issue reported on code.google.com by llamaXxX@gmail.com on 1 Jan 2009 at 5:41

GoogleCodeExporter commented 9 years ago
Good spot!  Thanks Llama once again for the code.

Original comment by lemonbe...@gmail.com on 8 Jan 2009 at 8:40

GoogleCodeExporter commented 9 years ago
Fixed in version 0.2.7

Original comment by lemonbe...@gmail.com on 16 Mar 2009 at 10:19