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

[BUG] Trying to access array offset on value of type null in ET_Client.php on line 645 #176

Open
1 of 4 tasks
Armandulis opened this issue Jun 15, 2023 · 0 comments
Open
1 of 4 tasks
Labels

Comments

@Armandulis
Copy link

Describe the bug
PHP shows warning PHP Warning: Trying to access array offset on value of type null in ../vendor/salesforce-mc/fuel-sdk-php/src/ET_Client.php on line 645 when assigning ET_Client to ET_Subscriber->authStub. This is flooding our logs and making a lot of unnecessary notification about the warnings. Doe not actually stop the functionality, it's just the warning.

To Reproduce

  1. Create new ET_Subscriber
  2. Authenticate create new ET_Client (as well as all of the authentication for ET_Client)
  3. Assign ET_Client to ET_Subscribers::authStub
  4. Warning is displayed

Expected behavior
I should not see the warning.

Screenshots
image

Code snippet

    $this->Subscriber = $ETSubscriber ?? FrontController::container()->get( ET_Subscriber::class );
    $this->Subscriber->authStub = $Client ?? FrontController::container()->get( ET_Client::class ); // First you need to authenticate the ET Client (just passing credentials to constructor)

Environment

  • SDK Version: 1.4.0
  • PHP version: 8.0.28

The bug has the severity

  • Critical: The defect affects critical functionality or critical data. It does not have a workaround.
  • Major: The defect affects major functionality or major data. It has a workaround but is not obvious and is difficult.
  • Minor: The defect affects minor functionality or non-critical data. It has an easy workaround.
  • Trivial: The defect does not affect functionality or data. It does not even need a workaround. It does not impact productivity or efficiency. It is merely an inconvenience.

Additional context
Add any other context about the problem here.

@Armandulis Armandulis added the bug label Jun 15, 2023
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