Fix PHP error on update of a contact with multiple email addresses when using PHP 7.1 (#5587)

pull/5754/head
Aleksander Machniak 7 years ago
parent 1568bd9e04
commit 82b826faef

@ -10,6 +10,7 @@ CHANGELOG Roundcube Webmail
- Fix so group/addressbook selection is retained on page refresh
- Fix bug where image data URIs in css style were treated as evil/remote in mail preview (#5580)
- Fix bug where external content in src attribute of input/video tags was not secured (#5583)
- Fix PHP error on update of a contact with multiple email addresses when using PHP 7.1 (#5587)
RELEASE 1.2.3
-------------

@ -670,8 +670,9 @@ function rcmail_contact_form($form, $record, $attrib = null)
}
// hack: create empty values array to force this field to be displayed
if (empty($values) && $colprop['visible'])
$values[] = '';
if (empty($values) && $colprop['visible']) {
$values = array('');
}
if (!is_array($values)) {
// $values can be an object, don't use (array)$values syntax
@ -680,8 +681,9 @@ function rcmail_contact_form($form, $record, $attrib = null)
$rows = '';
foreach ($values as $i => $val) {
if ($subtypes[$i])
if ($subtypes[$i]) {
$subtype = $subtypes[$i];
}
$colprop['id'] = 'ff_' . $col . intval($coltypes[$field]['count']);

Loading…
Cancel
Save