awesomemotive / WP-Mail-SMTP

The most popular WordPress SMTP and PHP Mailer plugin. Trusted by over 3 million sites.
https://wordpress.org/plugins/wp-mail-smtp/
GNU General Public License v3.0
55 stars 35 forks source link

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

Open patrick237 opened 2 years ago

patrick237 commented 2 years ago

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

Line 120

Is currently: $dataArray = array('notify' => $this->version == self::APIV1 ? $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::APIV1 ? ($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 commented 2 years ago

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!