File tree 1 file changed +13
-3
lines changed
1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,16 @@ public function disableIdFilter()
104
104
$ this ->useIdFilter = false ;
105
105
}
106
106
107
+ /**
108
+ * Remove ID filter if needed.
109
+ */
110
+ public function removeIDFilterIfNeeded ()
111
+ {
112
+ if (!$ this ->useIdFilter ) {
113
+ array_shift ($ this ->filters );
114
+ }
115
+ }
116
+
107
117
/**
108
118
* Get all conditions of the filters.
109
119
*
@@ -129,6 +139,8 @@ public function conditions()
129
139
130
140
$ conditions = [];
131
141
142
+ $ this ->removeIDFilterIfNeeded ();
143
+
132
144
foreach ($ this ->filters () as $ filter ) {
133
145
$ conditions [] = $ filter ->condition ($ params );
134
146
}
@@ -177,9 +189,7 @@ public function execute()
177
189
*/
178
190
public function render ()
179
191
{
180
- if (!$ this ->useIdFilter ) {
181
- array_shift ($ this ->filters );
182
- }
192
+ $ this ->removeIDFilterIfNeeded ();
183
193
184
194
if (empty ($ this ->filters )) {
185
195
return '' ;
You can’t perform that action at this time.
0 commit comments