Message ID | 20170418065254.8200-4-lfleischer@archlinux.org |
---|---|
State | Accepted, archived |
Headers | show |
Series | [1/4] Check query return value in pkgbase_user_notify() | expand |
diff --git a/web/lib/aurjson.class.php b/web/lib/aurjson.class.php index e07522d..9eeaafd 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) {
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> --- web/lib/aurjson.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)