Skip to content

Commit

Permalink
exchange " for '
Browse files Browse the repository at this point in the history
  • Loading branch information
alexh-swdev committed Jul 27, 2024
1 parent 0a70ee9 commit 4d015c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ public function render(Varien_Data_Form_Element_Abstract $element)
$defTextArr = [];
foreach ($options as $k => $v) {
if ($isMultiple) {
if (array_key_exists("value", $v) && is_array($v['value']) && in_array($k, $v['value'])) {
if (array_key_exists('value', $v) && is_array($v['value']) && in_array($k, $v['value'])) {
$defTextArr[] = $v['label'];
}
} elseif (array_key_exists("value", $v)) {
} elseif (array_key_exists('value', $v)) {
if ($v['value'] == $defText) {
$defTextArr[] = $v['label'];
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ protected function _getOptions()
*/
protected function _renderOption($option, $value)
{
$selected = (!is_null($value) && array_key_exists("value", $option) && ($option['value'] == $value)) ? ' selected="selected"' : '';
$selected = (!is_null($value) && array_key_exists('value', $option) && ($option['value'] == $value)) ? ' selected="selected"' : '';
return '<option value="' . $this->escapeHtml($option['value']) . '"' . $selected . '>' . $this->escapeHtml($option['label']) . '</option>';
}

Expand All @@ -66,7 +66,7 @@ public function getHtml()
$html = '<select name="' . $this->_getHtmlName() . '" id="' . $this->_getHtmlId() . '" class="no-changes">';
$value = $this->getValue();
foreach ($this->_getOptions() as $option) {
if (array_key_exists("value", $option) && is_array($option['value'])) {
if (array_key_exists('value', $option) && is_array($option['value'])) {
$html .= '<optgroup label="' . $this->escapeHtml($option['label']) . '">';
foreach ($option['value'] as $subOption) {
$html .= $this->_renderOption($subOption, $value);
Expand Down

0 comments on commit 4d015c8

Please sign in to comment.