Skip to content
This repository has been archived by the owner on Oct 3, 2019. It is now read-only.

Commit

Permalink
Check array index, fix #87
Browse files Browse the repository at this point in the history
  • Loading branch information
SG5 authored Oct 30, 2017
1 parent fea2cb1 commit 570e900
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/presenters/ProgramPresenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,10 @@ public function actionCreate()
$model = $this->getModel();
$data = $this->getHttpRequest()->getPost();

$this->setBacklink($data['backlink']);
unset($data['backlink']);
if (isset($data['backlink'])) {
$this->setBacklink($data['backlink']);
unset($data['backlink']);
}

if(!array_key_exists('display_in_reg', $data)) {
$data['display_in_reg'] = 1;
Expand Down

0 comments on commit 570e900

Please sign in to comment.