summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rpminfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rpminfo.c b/rpminfo.c
index 0b18644..83e270d 100644
--- a/rpminfo.c
+++ b/rpminfo.c
@@ -399,7 +399,7 @@ PHP_FUNCTION(rpmdbsearch)
di = rpmdbInitIterator(db, RPMDBI_PACKAGES, NULL, 0);
/* add criterion */
if (di) {
- if (rpmdbSetIteratorRE(di, crit, mode, name)) {
+ if (rpmdbSetIteratorRE(di, crit, (mode<0 ? RPMMIRE_DEFAULT : mode), name)) {
php_error_docref(NULL, E_WARNING, "Can't set filter");
rpmtsCloseDB(ts);
RETURN_FALSE;