phpList / phplist3

Fully functional Open Source email marketing manager for creating, sending, integrating, and analysing email campaigns and newsletters.
https://www.phplist.org
GNU Affero General Public License v3.0
737 stars 268 forks source link

Correct display of a select list for a boolean config item #975

Closed bramley closed 12 months ago

bramley commented 1 year ago

Description

When editing a boolean item on the Settings page, such as "Send notifications about subscribe, update and unsubscribe", the select list of Yes and No should show the current value but shows Yes when the current value is actually No. The code to select No is now incorrect due to php 8 being stricter about comparisons.

The value for a boolean seems to be "1" for true and an empty string for false. Previously $value == 0 would also be true when $value is an empty string.

if ($value === false || $value == 'false' || $value == 0) {

Related Issue

Screenshots (if appropriate):

image

michield commented 1 year ago

not tested, but looks fine to me

phpListDockerBot commented 11 months ago

This pull request has been mentioned on phpList Discuss. There might be relevant details there:

https://discuss.phplist.org/t/3-6-14-release-candidate-ready-for-testing/9109/1

phpListDockerBot commented 11 months ago

This pull request has been mentioned on phpList Discuss. There might be relevant details there:

https://discuss.phplist.org/t/phplist-3-6-14-released-security-release/9158/1