Null first parameter values are deprecated in strtotime()

Created on 22 September 2023, over 1 year ago
Updated 20 October 2023, about 1 year ago

Problem/Motivation

Null value as first parameter to strtotime() is deprecated.

Steps to reproduce

On site running PHP 8.1 (maybe previous versions?) reset Last Pull Date for a mapping. Note error in watchdog: "Deprecated function: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in Drupal\salesforce_pull\Plugin\QueueWorker\PullBase->updateEntity() (line 178 of /app/web/modules/contrib/salesforce/modules/salesforce_pull/src/Plugin/QueueWorker/PullBase.php)"

Note that any SF object with a blank trigger field will have these errors: "Deprecated function: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in Drupal\salesforce_pull\QueueHandler->enqueueResultSet() (line 293 of /app/web/modules/contrib/salesforce/modules/salesforce_pull/src/QueueHandler.php)"

Proposed resolution

Check for null value before passing parameter.

๐Ÿ› Bug report
Status

Fixed

Version

5.0

Component

salesforce_pull.module

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States sean_fremouw

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

Comments & Activities

Production build 0.71.5 2024