Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes PHP (7.4+) errors - "must not be accessed before initialization" in getLastRequest() & getLastResponse() #33

Merged
merged 1 commit into from
Apr 1, 2025

Conversation

marcing
Copy link
Contributor

@marcing marcing commented Jan 23, 2025

  1. When getLastResponse is called after the request has failed (exception was thrown)
    Elastic\Transport\Transport::$lastResponse must not be accessed before initialization

  2. When getLastRequest is called before any request
    Elastic\Transport\Transport::$lastRequest must not be accessed before initialization

Elastic\Transport\Transport::$lastResponse must not be accessed before initialization
&
Elastic\Transport\Transport::$lastRequest must not be accessed before initialization

1. When getLastResponse is called after the request has failed (exception was thrown)
2. When getLastRequest is called before any request
Copy link

cla-checker-service bot commented Jan 23, 2025

💚 CLA has been signed

@marcing
Copy link
Contributor Author

marcing commented Jan 23, 2025

Signed.

@ezimuel ezimuel self-assigned this Apr 1, 2025
@ezimuel ezimuel self-requested a review April 1, 2025 13:27
Copy link
Contributor

@ezimuel ezimuel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@ezimuel ezimuel merged commit 45dd554 into elastic:main Apr 1, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants