Skip to content

Commit

Permalink
regular expression match more than 1 number
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardonar committed Jan 26, 2017
1 parent 92ccdef commit 1faa2a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DBAL/Types/IntRangeType.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform)
public function convertToPHPValue($value, AbstractPlatform $platform)
{
if (null !== $value) {
if (false == preg_match('/^(\[|\()(\d),(\d)(\]|\))$/', $value)) {
if (false == preg_match('/^(\[|\()(\d+),(\d+)(\]|\))$/', $value)) {
throw ConversionException::conversionFailedFormat(
$value,
$this->getName(),
'(\[|\()(\d),(\d)(\]|\))$'
'(\[|\()(\d+),(\d+)(\]|\))$'
);
}

Expand Down

0 comments on commit 1faa2a5

Please sign in to comment.