fixed warning in htmlSelect

This commit is contained in:
Roland Gruber 2010-10-28 18:56:03 +00:00
parent 990f1e14c6
commit 1d584062a2
1 changed files with 4 additions and 2 deletions

View File

@ -664,7 +664,7 @@ class htmlSelect extends htmlElement {
/** elements */ /** elements */
private $elements; private $elements;
/** selected elements */ /** selected elements */
private $selectedElements; private $selectedElements = array();
/** descriptive elements */ /** descriptive elements */
private $hasDescriptiveElements = false; private $hasDescriptiveElements = false;
/** contains optgroups */ /** contains optgroups */
@ -700,7 +700,9 @@ class htmlSelect extends htmlElement {
function __construct($name, $elements, $selectedElements = array(), $size = 1) { function __construct($name, $elements, $selectedElements = array(), $size = 1) {
$this->name = htmlspecialchars($name); $this->name = htmlspecialchars($name);
$this->elements = $elements; $this->elements = $elements;
$this->selectedElements = $selectedElements; if ($selectedElements != null) {
$this->selectedElements = $selectedElements;
}
$this->size = htmlspecialchars($size); $this->size = htmlspecialchars($size);
} }