Add check on $attributes param in QuickForm/text to avoid warnings in PHP 7.1

pull/2487/head
Yannick Warnier 9 years ago
parent 3e34424ad9
commit ea85874a73
  1. 5
      main/inc/lib/pear/HTML/QuickForm/text.php

@ -49,8 +49,11 @@ class HTML_QuickForm_text extends HTML_QuickForm_input
public function __construct(
$elementName = null,
$elementLabel = null,
$attributes = array()
$attributes = []
) {
if (is_string($attributes) && empty($attributes)) {
$attributes = [];
}
if (is_array($attributes) || empty($attributes)) {
$attributes['class'] = 'form-control';
}

Loading…
Cancel
Save