Skip to content

Commit

Permalink
fix: add check if filters are empty
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Oct 17, 2023
1 parent 6c4d18e commit a23b611
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions system/Filters/Filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,10 @@ public function run(string $uri, string $position = 'before')
*/
public function runRequired(string $position = 'before')
{
if (! isset($this->config->required[$position]) || $this->config->required[$position] === []) {
return $position === 'before' ? $this->request : $this->response;
}

// Set the toolbar filter to the last position to be executed
if (
in_array('toolbar', $this->config->required['after'], true)
Expand Down

0 comments on commit a23b611

Please sign in to comment.