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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | salesforce-strtotime-deprecated-3389025-2.patch | 1.37 KB | sean_fremouw |
Issue fork salesforce-3389025
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
Comment #2
sean_fremouw commentedComment #5
sarwan_verma commentedComment #7
aaronbaumanFixed, thanks for the patch