Browse Source

Fix PHP8 warnings (#9142)

pull/9518/head
Aleksander Machniak 2 years ago
parent
commit
5976ee7363
  1. 4
      CHANGELOG.md
  2. 6
      installer/test.php
  3. 5
      program/include/rcmail_install.php

4
CHANGELOG.md

@ -1,5 +1,9 @@
# Changelog Roundcube Webmail # Changelog Roundcube Webmail
## Unreleased
- Fix PHP8 warnings (#9142)
## Release 1.6.3 ## Release 1.6.3
- Fix bug where installto.sh/update.sh scripts were removing some essential options from the config file (#9051) - Fix bug where installto.sh/update.sh scripts were removing some essential options from the config file (#9051)

6
installer/test.php

@ -53,7 +53,7 @@ else {
echo '<br />'; echo '<br />';
if ($RCI->configured && ($messages = $RCI->check_config())) { 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 '<h3 class="warning">Replaced config options</h3>';
echo '<p class="hint">The following config options have been replaced or renamed. '; echo '<p class="hint">The following config options have been replaced or renamed. ';
echo 'Please update them accordingly in your config files.</p>'; echo 'Please update them accordingly in your config files.</p>';
@ -66,7 +66,7 @@ if ($RCI->configured && ($messages = $RCI->check_config())) {
echo '</ul>'; echo '</ul>';
} }
if (is_array($messages['obsolete'])) {
if (!empty($messages['obsolete'])) {
echo '<h3>Obsolete config options</h3>'; 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>'; echo '<p class="hint">You still have some obsolete or inexistent properties set. This isn\'t a problem but should be noticed.</p>';
@ -82,7 +82,7 @@ if ($RCI->configured && ($messages = $RCI->check_config())) {
echo html::a(['href' => './?_mergeconfig=1'], 'config.inc.php') . ' &nbsp;'; echo html::a(['href' => './?_mergeconfig=1'], 'config.inc.php') . ' &nbsp;';
echo "</p>"; echo "</p>";
if (is_array($messages['dependencies'])) {
if (!empty($messages['dependencies'])) {
echo '<h3 class="warning">Dependency check failed</h3>'; 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>'; echo '<p class="hint">Some of your configuration settings require other options to be configured or additional PHP modules to be installed</p>';

5
program/include/rcmail_install.php

@ -332,7 +332,8 @@ class rcmail_install
return; return;
} }
$out = $seen = [];
$seen = [];
$out = ['defaults' => [], 'obsolete' => [], 'replaced' => [], 'dependencies' => [], 'missing' => []];
// iterate over the current configuration // iterate over the current configuration
foreach (array_keys($this->config) as $prop) { foreach (array_keys($this->config) as $prop) {
@ -405,8 +406,6 @@ class rcmail_install
} }
if ($version) { if ($version) {
$out['defaults'] = [];
foreach ($this->defaults_changes as $v => $opts) { foreach ($this->defaults_changes as $v => $opts) {
if (version_compare($v, $version, '>')) { if (version_compare($v, $version, '>')) {
$out['defaults'] = array_merge($out['defaults'], $opts); $out['defaults'] = array_merge($out['defaults'], $opts);

Loading…
Cancel
Save