Oké, I found it isn't really random.
It happens when I loop a foreach in the view of one controller/action.
If a image is not found, the session isn't found anymore
PHP Code:
<? if(count($this->bedrijven) > 0) : ?>
<table>
<thead>
<tr>
<th>Name</th>
<th>Address</th>
<th>Zipcode</th>
<th>Municipality</th>
<th>Country</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<? foreach($this->bedrijven as $bedrijf): ?>
<tr>
<td><?= $bedrijf['bedrijfnaam']; ?></td>
<td><?= $bedrijf['adres']; ?></td>
<td><?= $bedrijf['postcode']; ?></td>
<td><?= $bedrijf['gemeente']; ?></td>
<td><?= $bedrijf['land_naam']; ?></td>
<td class="actions">
<a href="<?= $this->baseUrl(); ?>/company/edit/id/<?= $bedrijf['ID']; ?>">
<img src="<?= $this->baseUrl(); ?>/images/icons/16x16/apps/package_editors.png"
alt="edit company info" title="edit company info" /></a>
<a href="<?= $this->baseUrl(); ?>/company/customers/id/<?= $bedrijf['ID']; ?>">
<img src="<?= $this->baseUrl(); ?>/images/icons/16x16/actions/agt_forum.png"
alt="list of users" title="list of users" /></a>
<a href="<?= $this->baseUrl(); ?>/room/add/id/<?= $bedrijf['ID']; ?>">
<img src="<?= $this->baseUrl(); ?>/images/icons/16x16/actions/edit_add.png"
alt="Add a new room" title="Add a new room" /></a>
<a href="<?= $this->baseUrl(); ?>/license/history/id/<?= $bedrijf['ID']; ?>">
<img src="<?= $this->baseUrl(); ?>"
alt="License history" title="License history" /></a>
<a href="<?= $this->baseUrl(); ?>/room/company/companyID/<?= $bedrijf['ID']; ?>">
<img src="<?= $this->baseUrl(); ?>"
alt="Company Licenses" title="Company Licenses" /></a>
<a href="<?= $this->baseUrl(); ?>/room/addroomproduct/bedrijfID/<?= $bedrijf['ID']; ?>">
<img src="<?= $this->baseUrl(); ?>"
alt="Link a product to a room" title="Link a aproduct to a room" /></a>
</td>
</tr>
<? endforeach; ?>
</tbody>
<tfoot>
<tr>
<td>
<!-- begin paging -->
<? if($this->pages['first']!= 0) : ?>
<a href="<?= $this->url(array('controller'=>'company','action'=>'list'),null,true) ?>/page/<?= $this->pages['first']; ?>/">[First]</a>
<a href="<?= $this->url(array('controller'=>'company','action'=>'list'),null,true) ?>/page/<?= $this->pages['previous']; ?>/">[Previous]</a>
<? endif ?>
<? for($i = 0; $i<count($this->pages['navigation']);$i++) : ?>
<? if($this->pages['currentPage'] == $this->pages['navigation'][$i]) : ?>
<?= $this->pages['navigation'][$i]; ?>
<? else : ?>
<a href="<?= $this->url(array('controller'=>'company','action'=>'list'),null,true) ?>/page/<?= $this->pages['navigation'][$i]; ?>/"><?= $this->pages['navigation'][$i]; ?></a>
<? endif ?>
<? endfor ?>
<? if ($this->pages['last'] != 0) : ?>
<a href="<?= $this->url(array('controller'=>'company','action'=>'list'),null,true) ?>/page/<?= $this->pages['next']; ?>/">[Next]</a>
<a href="<?= $this->url(array('controller'=>'company','action'=>'list'),null,true) ?>/page/<?= $this->pages['last'];?>">[Last]</a>
<? endif ?>
<!-- end paging -->
</td>
</tr>
</tfoot>
</table>
<? else : ?>
<p class="noResult">There are no companies registered yet.</p>
<? endif ?>