From f2fc1f71854c118df42eaa65fc64a1ce68810fe9 Mon Sep 17 00:00:00 2001 From: Andy Hebrank Date: Fri, 21 Apr 2023 13:01:59 -0400 Subject: [PATCH] ignore a filter if a value is not set --- plugins/restful/RestfulBase.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/restful/RestfulBase.php b/plugins/restful/RestfulBase.php index ec9f7fee..345752f6 100644 --- a/plugins/restful/RestfulBase.php +++ b/plugins/restful/RestfulBase.php @@ -1006,6 +1006,11 @@ protected function parseRequestForListFilter() { // filter[foo]=bar would be converted to filter[foo][value] = bar. $value = array('value' => $value); } + // It's possible someone is setting `operator` (or some other key) without a `value`. + // In these cases we should ignore the filter. + if (!isset($value['value'])) { + continue; + } if (!is_array($value['value'])) { $value['value'] = array($value['value']); }