PHP 8.1 ltrim deprecation

Created on 9 April 2023, about 1 year ago

Fix deprecation warning on PHP 8.1 caused by ltrim

  • Deprecated function: ltrim(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\facets_range_datepicker_widget\Plugin\facets\widget\DatepickerWidget->build() (line 72)

Steps to reproduce

  • Install the module
  • Create a view and a date range facet
  • Load the view using the facet

Proposed resolution

  • Prevent the warning by setting an empty string when the first parameter is null
πŸ’¬ Support request
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

πŸ‡·πŸ‡΄Romania sch2

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

Comments & Activities

Production build 0.69.0 2024