[DDC-2128] Fix PR according to comments.
This commit is contained in:
parent
93c018668d
commit
9a3cf77919
@ -76,9 +76,12 @@ class MetadataFilter extends \FilterIterator implements \Countable
|
||||
$metadata = $it->current();
|
||||
|
||||
foreach ($this->filter as $filter) {
|
||||
$pregResult = preg_match("/" . preg_quote($filter) . "/", $metadata->name);
|
||||
$pregResult = preg_match("/$filter/", $metadata->name);
|
||||
|
||||
if ($pregResult === false) {
|
||||
return false;
|
||||
throw new \RuntimeException(
|
||||
sprintf("Error while evaluating regex '/%s/'.", $filter)
|
||||
);
|
||||
}
|
||||
|
||||
if ($pregResult === 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user