Deprecated function: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated

Created on 23 June 2025, 11 days ago

I'm getting this warning on my project:

\Deprecated function: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in Drupal\external_entities\Plugin\ExternalEntities\DataProcessor\DateTime->processData() (line 195 of modules/contrib/external_entities/src/Plugin/ExternalEntities/DataProcessor/DateTime.php).

Drupal\external_entities\Plugin\ExternalEntities\DataProcessor\DateTime->processData() (Line: 360)
Drupal\external_entities\PropertyMapper\PropertyMapperBase->processData() (Line: 108)
Drupal\external_entities\Plugin\ExternalEntities\PropertyMapper\JsonPath->extractPropertyValuesFromRawData() (Line: 488)
Drupal\external_entities\FieldMapper\FieldMapperBase->extractFieldValuesFromRawData() (Line: 779)
Drupal\external_entities\ExternalEntityStorage->extractEntityValuesFromRawData() (Line: 806)
Drupal\external_entities\ExternalEntityStorage->mapRawDataToExternalEntities() (Line: 858)
Drupal\external_entities\ExternalEntityStorage->getFromExternalStorage() (Line: 274)
Drupal\external_entities\ExternalEntityStorage->doLoadMultiple() (Line: 312)
Drupal\Core\Entity\EntityStorageBase->loadMultiple() (Line: 183)
Drupal\Core\Entity\EntityRepository->getCanonicalMultiple() (Line: 175)
Drupal\Core\Entity\EntityRepository->getCanonical() (Line: 134)
Drupal\Core\ParamConverter\EntityConverter->convert() (Line: 100)
Drupal\Core\ParamConverter\ParamConverterManager->convert() (Line: 45)
Drupal\Core\Routing\Enhancer\ParamConversionEnhancer->enhance() (Line: 276)
Drupal\Core\Routing\Router->applyRouteEnhancers() (Line: 156)
Drupal\Core\Routing\Router->matchRequest() (Line: 92)
Drupal\Core\Routing\AccessAwareRouter->matchRequest() (Line: 105)
Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest()
call_user_func() (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 157)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 741)
Drupal\Core\DrupalKernel->handle() (Line: 19)

Looks like the DateTime data processor doesn't, for the iso8601 format option, first check if the value is set before passing it to strtotime.

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇧🇪Belgium rp7

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024