User tests: Successful: Unsuccessful:
if
block replaced with null coalescing operator to reduce code and make it more readable.
Go to administrator/components/com_plugins/src/Model/PluginsModel.php
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_plugins |
Another question is if this PR is right, then why is it made for the 4.1-dev branch? The same code exists also in the 4.0-dev branch, where we also could use null coalesce. Only in J3 we can't use it due to minimum version requirement for PHP being not high enough.
I don't think this is right. The null coalesce operator returns the first value if it exists and is not null, otherwise the second operator. An empty string is not null, i.e. with this change here, the empty string will be used.
I think that's right. Sorry for disturbing. I will close the pull request
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-04-22 17:39:39 |
Closed_By | ⇒ | eopws | |
Labels |
Added:
?
|
I don't think this is right. The null coalesce operator returns the first value if it exists and is not null, otherwise the second operator. An empty string is not null, i.e. with this change here, the empty string will be used.