Search Settings -> Update Settings fails when search filter is blank

Bug #197036 reported by Kris Marsh
4
Affects Status Importance Assigned to Milestone
torrentflux (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: torrentflux

You can reproduce this by browsing to:

/admin.php?op=searchSettings

Or via the admin menu: Admin->Search Settings

Changing the search engine to one that has no filters (e.g. "isoHunt"), and then clicking "Update Settings".

---

With the default install, there are some search engines with no search filters. When trying to save the page in this instance, it fails:

Warning: Invalid argument supplied for foreach() in /usr/share/torrentflux/www/settingsfunctions.php on line 158

The problem exists because settingsfunction.php::saveSettings($settings) does not check $settings==null before trying to iterate through it. Patch attached to resolve the problem.

I've also checked the source for the Hardy package and the same error exists. Patch should apply cleanly on both.

Information:

root@greebo:/usr/share/torrentflux/www# apt-cache show torrentflux | grep Version
Version: 2.3-2ubuntu1
root@greebo:/usr/share/torrentflux/www# grep DESCR /etc/lsb-release
DISTRIB_DESCRIPTION="Ubuntu 7.10"

Revision history for this message
Kris Marsh (moogman) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package torrentflux - 2.3-8

---------------
torrentflux (2.3-8) unstable; urgency=low

  * Add ability to install with non-apache webservers (Closes: #461605)
    (no auto-configuration though, you have to configure it yourself)
  * Fix updating search setttings when there are no filters (LP: #197036)

 -- Ubuntu Archive Auto-Sync <email address hidden> Sat, 03 May 2008 11:20:42 +0100

Changed in torrentflux:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.