summaryrefslogtreecommitdiffstats
path: root/lib/search.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-08-31 05:52:30 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-08-31 05:52:30 +0000
commit12a6c9adddc3ad232452275c2721cd370e9d76ca (patch)
treeb0354272b3bcd67044206751117c591a10bc1e0c /lib/search.php
parent0aebfb24e5b26adf1101f0cd3703660764ced57f (diff)
downloadampache-12a6c9adddc3ad232452275c2721cd370e9d76ca.tar.gz
ampache-12a6c9adddc3ad232452275c2721cd370e9d76ca.tar.bz2
ampache-12a6c9adddc3ad232452275c2721cd370e9d76ca.zip
fix search when no results are found, actually show the correct "error"
Diffstat (limited to 'lib/search.php')
-rw-r--r--lib/search.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/search.php b/lib/search.php
index 2804c794..a621fc6e 100644
--- a/lib/search.php
+++ b/lib/search.php
@@ -85,7 +85,7 @@ function run_search($data) {
break;
} // end switch
- return false;
+ return array();
} // run_search
@@ -219,6 +219,8 @@ function search_song($data,$operator,$method,$limit) {
$_SESSION['userdata']['stored_search'] = $sql;
$db_results = Dba::query($sql);
+
+ $results = array();
while ($row = Dba::fetch_assoc($db_results)) {
$results[] = $row['id'];