Skip to content

Commit

Permalink
Fix Model::set() with no longer supported array input (#1367)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek authored Jul 15, 2020
1 parent cf879b0 commit c07e8c4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/Modal.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,9 @@ public function settings($setting_option, $value)
*/
public function addDenyAction($label, $jsAction)
{
$b = new Button();
$b->set($label)->addClass('red cancel');
$this->addButtonAction($b);
$button = new Button();
$button->set($label)->addClass('red cancel');
$this->addButtonAction($button);
$this->options['modal_option']['onDeny'] = $jsAction;

return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/Table/Column/FilterPopup.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function init(): void

//load data associated with this popup.
if ($data = $model->recallData()) {
$model->set($data);
$model->setMulti($data);
}
$this->form->setModel($model);

Expand Down
2 changes: 1 addition & 1 deletion src/UserAction/ModalExecutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ protected function doPreview(View $modal)
$this->_addStepTitle($modal, $this->step);

if ($fields = $this->actionData['fields'] ?? null) {
$this->action->getModel()->set($fields);
$this->action->getModel()->setMulti($fields);
}

if ($prev = $this->getPreviousStep($this->step)) {
Expand Down

0 comments on commit c07e8c4

Please sign in to comment.