PHP 8 Compatibility

Created on 7 July 2022, over 2 years ago
Updated 13 September 2023, over 1 year ago

strftime is deprecated as of PHP 8.1.0 and will be removed in PHP 9.
[https://www.php.net/manual/en/function.strftime.php]

Deprecated function: Function strftime() is deprecated in Drupal\health_check_url\Form\HealthCheckSettingsForm->buildForm() (line 38 of /var/www/html/web/modules/contrib/health_check_url/src/Form/HealthCheckSettingsForm.php) #0 /var/www/html/web/core/includes/bootstrap.inc(347): _drupal_error_handler_real() #1 /var/www/html/web/modules/contrib/health_check_url/src/Form/HealthCheckSettingsForm.php(38): _drupal_error_handler() #2 [internal function]: Drupal\health_check_url\Form\HealthCheckSettingsForm->buildForm() #3 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(531): call_user_func_array() #4 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(278): Drupal\Core\Form\FormBuilder->retrieveForm() #5 /var/www/html/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm() #6 [internal function]: Drupal\Core\Controller\FormController->getContentResult() #7 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array() #8 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(564): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\@closure() #9 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext() #10 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() #11 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(169): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\@closure() #12 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw() #13 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle() #14 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle() #15 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(108): Drupal\Core\StackMiddleware\KernelPreHandle->handle() #16 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(87): Drupal\page_cache\StackMiddleware\PageCache->pass() #17 /var/www/html/vendor/asm89/stack-cors/src/Asm89/Stack/Cors.php(49): Drupal\page_cache\StackMiddleware\PageCache->handle() #18 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Asm89\Stack\Cors->handle() #19 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() #20 /var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() #21 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(721): Stack\StackedHttpKernel->handle() #22 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle() #23 @main.

This patch updates the module to use date() instead, to avoid deprecation notices

🐛 Bug report
Status

Fixed

Version

3.1

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024