ErrorException: Array to string conversion - VENDORPATH/lonnieezell/bonfire/src/Settings/Views/_timezones.php at line 4
goatrance opened this issue · comments
goatrance commented
After installation I got this error message in Settings->General
ErrorException: Array to string conversion - VENDORPATH/lonnieezell/bonfire/src/Settings/Views/_timezones.php at line 4
This solved the problem:
<option value="">Select...</option>
<?php foreach ($options as $option) : ?>
<?php foreach ($option as $timezone => $name) : ?>
<option value="<?= $timezone ?>" <?php if ($selectedTZ === $timezone) : ?> selected <?php endif ?>>
<?= $name ?>
</option>
<?php endforeach ?>
<?php endforeach ?>
Iulian Nastasache commented
Or just change in GeneralSettingsController.php?
if ($area === 'UTC') {
$options[] = ['UTC' => 'UTC'];
} ...
to
if ($area === 'UTC') {
$options['UTC'] = 'UTC';
} ...
goatrance commented
I see, that's better, thanks