Skip to content

Commit

Permalink
Fix "Invalid argument supplied for foreach()"
Browse files Browse the repository at this point in the history
  • Loading branch information
blackcoder87 committed Jan 5, 2019
1 parent c66815b commit d9f6ff7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions application/modules/away/mappers/Away.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function getAway($where = [])
->fetchRows();

if (empty($entryArray)) {
return null;
return [];
}

$away = [];
Expand Down Expand Up @@ -100,7 +100,8 @@ public function save(AwayModel $away)
*
* @param integer $start
* @param integer $end
* @return AwayModel|null
* @return AwayModel[]|array|null
* @throws \Ilch\Database\Exception
*/
public function getEntriesForJson($start, $end)
{
Expand Down
2 changes: 1 addition & 1 deletion application/modules/away/views/admin/index/index.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php $userCache = $this->get('userCache') ?>

<h1><?=$this->getTrans('manage') ?></h1>
<?php if ($this->get('aways') != ''): ?>
<?php if (!empty($this->get('aways'))): ?>
<form class="form-horizontal" method="POST" action="">
<?=$this->getTokenField() ?>
<div class="table-responsive">
Expand Down
2 changes: 1 addition & 1 deletion application/modules/away/views/index/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<th colspan="3"><?=$this->getTrans('status') ?></th>
</tr>
</thead>
<?php if ($this->get('aways') != ''): ?>
<?php if (!empty($this->get('aways'))): ?>
<form class="form-horizontal" method="POST" action="">
<?=$this->getTokenField() ?>
<tbody>
Expand Down

0 comments on commit d9f6ff7

Please sign in to comment.