"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "public_html/lists/base/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/AbstractComparisonValidator.php" between
phplist-3.4.5.tgz and phplist-3.4.6.tgz

About: phpList is a one-way email announcement delivery system for newsletters, publicity lists, notifications, and many other uses (requires PHP and MySQL).

AbstractComparisonValidator.php  (phplist-3.4.5.tgz):AbstractComparisonValidator.php  (phplist-3.4.6.tgz)
skipping to change at line 67 skipping to change at line 67
} catch (NoSuchPropertyException $e) { } catch (NoSuchPropertyException $e) {
throw new ConstraintDefinitionException(sprintf('Invalid propert y path "%s" provided to "%s" constraint: %s', $path, \get_class($constraint), $e ->getMessage()), 0, $e); throw new ConstraintDefinitionException(sprintf('Invalid propert y path "%s" provided to "%s" constraint: %s', $path, \get_class($constraint), $e ->getMessage()), 0, $e);
} }
} else { } else {
$comparedValue = $constraint->value; $comparedValue = $constraint->value;
} }
// Convert strings to DateTimes if comparing another DateTime // Convert strings to DateTimes if comparing another DateTime
// This allows to compare with any date/time value supported by // This allows to compare with any date/time value supported by
// the DateTime constructor: // the DateTime constructor:
// http://php.net/manual/en/datetime.formats.php // https://php.net/datetime.formats
if (\is_string($comparedValue)) { if (\is_string($comparedValue)) {
if ($value instanceof \DateTimeImmutable) { if ($value instanceof \DateTimeImmutable) {
// If $value is immutable, convert the compared value to a // If $value is immutable, convert the compared value to a
// DateTimeImmutable too // DateTimeImmutable too
$comparedValue = new \DateTimeImmutable($comparedValue); $comparedValue = new \DateTimeImmutable($comparedValue);
} elseif ($value instanceof \DateTimeInterface) { } elseif ($value instanceof \DateTimeInterface) {
// Otherwise use DateTime // Otherwise use DateTime
$comparedValue = new \DateTime($comparedValue); $comparedValue = new \DateTime($comparedValue);
} }
} }
skipping to change at line 115 skipping to change at line 115
*/ */
abstract protected function compareValues($value1, $value2); abstract protected function compareValues($value1, $value2);
/** /**
* Returns the error code used if the comparison fails. * Returns the error code used if the comparison fails.
* *
* @return string|null The error code or `null` if no code should be set * @return string|null The error code or `null` if no code should be set
*/ */
protected function getErrorCode() protected function getErrorCode()
{ {
return null;
} }
} }
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)