Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

[BUG] PHP 8: Deprecated function: trim(): Passing null to parameter of type string is deprecated. #172

Open
1 task
carma03 opened this issue Feb 9, 2023 · 0 comments
Labels

Comments

@carma03
Copy link

carma03 commented Feb 9, 2023

Describe the bug
On PHP >= 8, there is ocurring this warning error:
Deprecated function: trim(): Passing null to parameter #1 ($string) of type string is deprecated in FuelSdk\ET_Client->createPayloadForOauth2() (line 392 of /app/vendor/salesforce-mc/fuel-sdk-php/src/ET_Client.php)

To Reproduce
Try to authenticate or send a Data Extension row.

Expected behavior
No throws PHP warning errors.

Possible solution:
Due to trim function on PHP +8 is expecting a string as parameter, use the null coalescing operator to provide a default value as appropriate.
image

Environment

  • FuelSDK-PHP version: v1.4.0
  • Lando v3.11.0
  • PHP 8.1.14
  • MacOS

The bug has the severity

  • Minor: The defect affects minor functionality or non-critical data. It has an easy workaround.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant