Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • typo3 typo3
  • Project information
    • Project information
    • Activity
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Insights
    • Repository
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • typo3typo3
  • typo3typo3
  • Repository
Switch branch/tag
  • typo3
  • typo3
  • sysext
  • core
  • Classes
  • DataHandling
  • DataHandler.php
Find file BlameHistoryPermalink
  • Nikita Hovratov's avatar
    [BUGFIX] Skip range validation if input value and default are both "0" · 2d04af91
    Nikita Hovratov authored Jul 23, 2021 and Benni Mack's avatar Benni Mack committed Jul 29, 2021
    This patch fixes a regression originally introduced in #94103. The
    problem there was simply an erroneous strict comparison, which further
    got completely removed in #94527 due to a misconception.
    
    The mentioned condition is important for date type fields with a lower
    range set in TCA. If the user doesn't provide a value for that date
    field, the range validation should be skipped. Otherwise this empty
    value would always be interpreted as 0, resulting the validation to
    change it to the lower range value.
    
    As this is a special case, the condition was extracted and rewritten,
    to only apply for this exact scenario. Other than that the validation
    should not be skipped.
    
    An acceptance test and a unit test are added to ensure this behavior
    can't break anymore.
    
    Resolves: #94621
    Related: #94103
    Related: #94527
    Releases: master, 10.4
    Change-Id: I54c1a815077e48064f9f6eeba9584184c5f760d7
    Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70060
    
    
    Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
    Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
    Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
    Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
    Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
    2d04af91