diff --git a/lib/Doctrine/ORM/Tools/Console/MetadataFilter.php b/lib/Doctrine/ORM/Tools/Console/MetadataFilter.php index 92a4a6b58..1d3764700 100644 --- a/lib/Doctrine/ORM/Tools/Console/MetadataFilter.php +++ b/lib/Doctrine/ORM/Tools/Console/MetadataFilter.php @@ -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; } }