1
0
mirror of synced 2025-01-08 10:07:10 +03:00

checking preg result. Should I raise an error

throw new ORMException("Error regular expression: " . $filter);
This commit is contained in:
catalin 2012-11-06 22:38:46 +02:00 committed by Benjamin Eberlei
parent 0d8f572661
commit 93c018668d

View File

@ -76,7 +76,16 @@ class MetadataFilter extends \FilterIterator implements \Countable
$metadata = $it->current();
foreach ($this->filter as $filter) {
if (preg_match("/" . preg_quote($filter) . "/", $metadata->name)) {
$pregResult = preg_match("/" . preg_quote($filter) . "/", $metadata->name);
if ($pregResult === false) {
return false;
}
if ($pregResult === 0) {
return false;
}
if ($pregResult) {
return true;
}
}