summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2017-04-18 08:44:24 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2017-04-18 08:45:02 +0200
commit15501972bce458ad7862786311ca8264f5f34081 (patch)
tree65bd52e6cdbea785d8e2281f566ed6c1a1e327b4
parent4f662c773dd70145640074f2659954e8f8a3daef (diff)
downloadaur-15501972bce458ad7862786311ca8264f5f34081.tar.gz
aur-15501972bce458ad7862786311ca8264f5f34081.tar.xz
Check return value of get_extended_fields()
Make sure that the get_extended_fields() invocation succeeded before merging regular and extended fields in process_query(). Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
-rw-r--r--web/lib/aurjson.class.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/web/lib/aurjson.class.php b/web/lib/aurjson.class.php
index e07522d4..9eeaafde 100644
--- a/web/lib/aurjson.class.php
+++ b/web/lib/aurjson.class.php
@@ -313,7 +313,10 @@ class AurJSON {
}
if ($this->version >= 2 && ($type == 'info' || $type == 'multiinfo')) {
- $row = array_merge($row, $this->get_extended_fields($row['ID'], $row['PackageBaseID']));
+ $extfields = $this->get_extended_fields($row['ID'], $row['PackageBaseID']);
+ if ($extfields) {
+ $row = array_merge($row, $extfields);
+ }
}
if ($this->version < 3) {