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

Nested ternary expressions (without parentheses) deprecated in php 7.4 #116

Open
patrick237 opened this issue Apr 21, 2022 · 1 comment
Open

Comments

@patrick237
Copy link

Located in:
vendor_prefixed/monolog/monolog/src/monolog/handler/HipChatHandler.php

Line 120

Is currently:
$dataArray = array('notify' => $this->version == self::API_V1 ? $this->notify ? 1 : 0 : ($this->notify ? 'true' : 'false'), 'message' => $record['formatted'], 'message_format' => $this->format, 'color' => $this->getAlertColor($record['level']));

Needs to be updated to:
$dataArray = array('notify' => $this->version == self::API_V1 ? ($this->notify ? 1 : 0) : ($this->notify ? 'true' : 'false'), 'message' => $record['formatted'], 'message_format' => $this->format, 'color' => $this->getAlertColor($record['level']));

Notice added parens ($this->notify ? 1 : 0)

@capuderg
Copy link
Contributor

capuderg commented May 4, 2022

Hi @patrick237,

sorry for this late reply. We'll look into this issue for our next release. Our plugin does not use Monolog directly, but our dependencies do, so we have to look into this issue or possibly remove this file from our plugin.

Thanks for letting us know and we'll update you once this is resolved.

Take care!

@donmhico donmhico assigned donmhico and unassigned donmhico Jul 25, 2023
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

No branches or pull requests

3 participants