Avoid fatals when the filter tags is empty
authorAmir Sarabadani <ladsgroup@gmail.com>
Tue, 16 Oct 2018 11:02:45 +0000 (13:02 +0200)
committerAmir Sarabadani <ladsgroup@gmail.com>
Tue, 16 Oct 2018 11:05:32 +0000 (13:05 +0200)
Bug: T194164
Change-Id: I418cbe2259e7c1622a58a4a310a3cd56873f16c3

includes/changetags/ChangeTags.php

index 8dc63e5..d9ca8d7 100644 (file)
@@ -836,7 +836,10 @@ class ChangeTags {
                                                break;
                                        };
                                }
-                               $conds['ct_tag_id'] = $filterTagIds;
+
+                               if ( $filterTagIds !== [] ) {
+                                       $conds['ct_tag_id'] = $filterTagIds;
+                               }
                        } else {
                                $conds['ct_tag'] = $filter_tag;
                        }