Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d463f7f

Browse files
committed
Update Widget.php
1 parent 8412f63 commit d463f7f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎Ajax/common/Widget.php‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,15 @@ abstract class Widget extends HtmlDoubleElement {
6565
protected $_runned;
6666

6767
protected $_hasRules;
68-
68+
6969
public function __construct($identifier, $model, $modelInstance = NULL) {
7070
parent::__construct($identifier);
7171
$this->_template = "%wrapContentBefore%%content%%wrapContentAfter%";
7272
$this->setModel($model);
7373
if (isset($modelInstance)) {
74-
$this->_model=get_class($modelInstance);
74+
if (\is_object($modelInstance)) {
75+
$this->_model = \get_class($modelInstance);
76+
}
7577
$this->show($modelInstance);
7678
}
7779
$this->_generated = false;
@@ -481,7 +483,7 @@ protected function _compileForm() {
481483
$noValidate = "";
482484
if (\sizeof($this->_form->getValidationParams()) > 0)
483485
$noValidate = "novalidate";
484-
$this->wrapContent("<form .$this->_form->getProperty('class')."' id='frm-" . $this->identifier . "' name='frm-" . $this->identifier . "' " . $noValidate . ">", "</form>");
486+
$this->wrapContent("<form class='" . $this->_form->getProperty('class') . "' id='frm-" . $this->identifier . "' name='frm-" . $this->identifier . "' " . $noValidate . ">", "</form>");
485487
}
486488
}
487489

@@ -544,5 +546,4 @@ public function getModelInstance() {
544546
public function hasRules() {
545547
return $this->_hasRules;
546548
}
547-
548549
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /