Opened 13 years ago
Closed 12 years ago
Last modified 12 years ago
Mythweb: Handle empty recommended shows gracefully
When using the Mythweb TV "Recommended Programs" page, it throws a SQL error if your account on the recommendation website has no programs (that is, if you haven't indicated any preference to any show/actor/genre yet). The cause is the $extra_query argument to load_all_program_data--the formatting in modules/tv/recommended.php causes it to send "()" if $query is empty, which leads to a SQL SELECT clause containing "AND ()" which is invalid. This patch checks the string length of $query and if it's empty, sends 'FALSE' instead, which should appropriately load no programs.
Graceful fix for empty recommendation list