Skip to content

Commit a07245f

Browse files
committed
fromArray bug fixed
1 parent 25ea1ad commit a07245f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Ajax/common/html/BaseHtml.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,8 @@ public function setTagName($tagName) {
213213

214214
public function fromArray($array) {
215215
foreach ( $this as $key => $value ) {
216-
$this->_callSetter("set" . ucfirst($key), $key, $value, $array);
217-
if (array_key_exists($key, $array) && !JString::startswith($key, "_")) {
218-
$setter="set" . ucfirst($key);
219-
$this->$setter($array[$key]);
220-
unset($array[$key]);
221-
}
216+
if(array_key_exists($key, $array)===true)
217+
$this->_callSetter("set" . ucfirst($key), $key, $array[$key], $array);
222218
}
223219
foreach ( $array as $key => $value ) {
224220
if($this->_callSetter($key, $key, $value, $array)===false){

0 commit comments

Comments
 (0)