Skip to content

Commit

Permalink
Don't use static here - just instantiate the right class
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Dec 6, 2019
1 parent 557a1fc commit 2fb4c17
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Filters/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ public function accept()
*/
public function getChildren()
{
$children = new static(
$filterClass = get_called_class();
$children = new $filterClass(
new \RecursiveDirectoryIterator($this->current(), (\RecursiveDirectoryIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS)),
$this->basedir,
$this->config,
Expand Down

0 comments on commit 2fb4c17

Please sign in to comment.