Skip to content

Commit

Permalink
Fix PHP8 warnings (roundcube#9142)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed Sep 18, 2023
1 parent 77522fb commit 20447fa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
- Password: Add ldap_samba_ad driver (#8525)
- Password: Allow LDAP access using LDAP URI and SASL binding (#8402)
- Fix potential HTTP protocol version mismatch (#8982)
- Fix PHP8 warnings (#9142)

## Release 1.6.3

Expand Down
6 changes: 3 additions & 3 deletions installer/test.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
echo '<br />';

if ($RCI->configured && ($messages = $RCI->check_config())) {
if (is_array($messages['replaced'])) {
if (!empty($messages['replaced'])) {
echo '<h3 class="warning">Replaced config options</h3>';
echo '<p class="hint">The following config options have been replaced or renamed. ';
echo 'Please update them accordingly in your config files.</p>';
Expand All @@ -66,7 +66,7 @@
echo '</ul>';
}

if (is_array($messages['obsolete'])) {
if (!empty($messages['obsolete'])) {
echo '<h3>Obsolete config options</h3>';
echo '<p class="hint">You still have some obsolete or inexistent properties set. This isn\'t a problem but should be noticed.</p>';

Expand All @@ -82,7 +82,7 @@
echo html::a(['href' => './?_mergeconfig=1'], 'config.inc.php') . ' &nbsp;';
echo "</p>";

if (is_array($messages['dependencies'])) {
if (!empty($messages['dependencies'])) {
echo '<h3 class="warning">Dependency check failed</h3>';
echo '<p class="hint">Some of your configuration settings require other options to be configured or additional PHP modules to be installed</p>';

Expand Down
5 changes: 2 additions & 3 deletions program/include/rcmail_install.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,8 @@ public function check_config($version = null)
return;
}

$out = $seen = [];
$seen = [];
$out = ['defaults' => [], 'obsolete' => [], 'replaced' => [], 'dependencies' => [], 'missing' => []];

// iterate over the current configuration
foreach (array_keys($this->config) as $prop) {
Expand Down Expand Up @@ -401,8 +402,6 @@ public function check_config($version = null)
}

if ($version) {
$out['defaults'] = [];

foreach ($this->defaults_changes as $v => $opts) {
if (version_compare($v, $version, '>')) {
$out['defaults'] = array_merge($out['defaults'], $opts);
Expand Down

0 comments on commit 20447fa

Please sign in to comment.