Skip to content

Commit ad6c2e9

Browse files
committed
Doesn't work on PHP 5.6
1 parent df7aa31 commit ad6c2e9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

HTML/QuickForm2/Element/Hierselect.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,8 @@ private function _generateInlineScript()
332332
{
333333
// we store values and options with id of first select rather than with
334334
// the element's name since the former has more chances to be unique
335-
$selectId = (reset($this->elements) ?: $this)->getId();
335+
$element = reset($this->elements) ?: $this;
336+
$selectId = $element->getId();
336337
$cr = self::getOption(self::OPTION_LINEBREAK);
337338
$js = "qf.elements.hierselect.defaults['{$selectId}'] = " .
338339
HTML_QuickForm2_JavascriptBuilder::encode($this->_values) . ";{$cr}";

0 commit comments

Comments
 (0)