1
0
mirror of synced 2025-01-29 19:41:45 +03:00

[DDC-2128] Fix PR according to comments.

This commit is contained in:
Benjamin Eberlei 2014-01-03 00:08:20 +01:00
parent 93c018668d
commit 9a3cf77919

View File

@ -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) {