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.

Issue fork salesforce-3389025

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sean_fremouw created an issue. See original summary.

sean_fremouw’s picture

sarwan made their first commit to this issue’s fork.

sarwan_verma’s picture

Status: Active » Needs review

aaronbauman’s picture

Status: Needs review » Fixed

Fixed, thanks for the patch

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.