Skip to content

[Monolog Bridge] ErrorException: Accessing static property $sendHeaders as non static #34505

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

Closed
Sander-Toonen opened this issue Nov 22, 2019 · 1 comment

Comments

@Sander-Toonen
Copy link
Contributor

Symfony version(s) affected: 4.4
The problem started after updating SF4.3 to 4.4 but I'm not really sure why earlier versions would not be affected. I am running php 7.3.11.

Description
When using the ChromePHPHandler the following error may occur:

Notice: Accessing static property Symfony\Bridge\Monolog\Handler\ChromePhpHandler::$sendHeaders as non static in ChromePhpHandler.php line 62

To replicate add the following to the monolog configuration:

monolog:
    handlers:
        chromephp:
            type: chromephp
            level: debug

I think we can replace the $this->sendHeaders on lines 44 and 62 with self::$sendHeaders without any problem since the sendHeaders property is static in both version 1.25.1 and 2.x of monolog.

PR is on its way.

@fancyweb
Copy link
Contributor

Status: reviewed

Please send the pull request 👏

@fabpot fabpot closed this as completed Nov 24, 2019
fabpot added a commit that referenced this issue Nov 24, 2019
…atic. (Sander-Toonen)

This PR was submitted for the 4.4 branch but it was merged into the 3.4 branch instead (closes #34533).

Discussion
----------

[Monolog Bridge] Fixed accessing static property as non static.

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  |  no
| Deprecations? | no
| Tickets       | Fix #34505
| License       | MIT
| Doc PR        | N/A

Commits
-------

aa045d1 [Monolog Bridge] Fixed accessing static property as non static.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants