Permalink
Browse files

Fix PHP error on update of a contact with multiple email addresses wh…

…en using PHP 7.1 (#5587)
  • Loading branch information...
1 parent a9feb86 commit 700fbd4066e16a41faa1daff3def6f0f86301175 @alecpl alecpl committed Jan 10, 2017
Showing with 6 additions and 3 deletions.
  1. +1 −0 CHANGELOG
  2. +5 −3 program/steps/addressbook/func.inc
View
@@ -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']);

0 comments on commit 700fbd4

Please sign in to comment.