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

pull/5590/head
Aleksander Machniak 7 years ago
parent a9feb8675c
commit 700fbd4066

@ -3,6 +3,7 @@ CHANGELOG Roundcube Webmail
- 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.3-beta
----------------

@ -671,8 +671,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
@ -681,8 +682,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