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
  • frontend
  • Classes
  • ContentObject
  • ContentObjectRenderer.php
Find file BlameHistoryPermalink
  • Stefan Bürk's avatar
    [BUGFIX] Suppress E_DEPRECATED for strftime() and gmstrftime() · a15953b4
    Stefan Bürk authored Nov 04, 2021 and Andreas Fernandez's avatar Andreas Fernandez committed Nov 05, 2021
    PHP functions strftime() and gmstrftime() have been deprecated in
    PHP 8.1 and will be removed in PHP 9.0. Currently, there is no way
    to replace this seamlessly as no drop-in replacement is available.
    
    Official PHP 8.1 deprecation RFC:
    https://wiki.php.net/rfc/deprecations_php_8_1#strftime_and_gmstrftime
    
    strftime() has been used in several places in the core, and even
    concrete wrapper like TypoScript 'stdWrap_strftime' or support in
    fluid viewhelper 'f:date'. Besides this, some places used it to
    format date or locale datetimes, which may be replaceable.
    
    As we cannot provide drop-in replacement which would be breaking,
    or adding a hard requirement of the optional php extension intl,
    this patch suppresses deprecation warnings on calls of strftime()
    and gmstrftime(), using the '@' error control operator.
    
    Further, corresponding @todo's are added along the way to replace
    the occurrences in v12.
    
    Resolves: #95875
    Related: #95872
    Releases: master
    Change-Id: Ieb152ab5822f0d2e720a102873f51f4972e3784c
    Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72055
    
    
    Tested-by: Nikita Hovratov's avatarNikita Hovratov <nikita.h@live.de>
    Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
    Tested-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
    Reviewed-by: Nikita Hovratov's avatarNikita Hovratov <nikita.h@live.de>
    Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
    a15953b4