Code not working in php7 (Kirby 1.x version)


Due to several reasons I still have a site running on kirby 1.x
The php was recently upgraded to 7.0 and after changing something in kirby code (as suggested on this forum) the site is working, yet I seem to have 1 problem still making issues.

The code below is throwing an error in php 7. It didn’t in php 5.4.
Can someone help me out with this one, as I really am looking over the problem I guess.


<?php $gallery = $pages->find('/projects/'); ?>
				<? if($gallery->hasImages()) : ?>
				<div class="row projects-thumbs" id="projects-thumbs">
					<? foreach($gallery->images() as $image): ?>
					<div class="col-xs-12 col-sm-6 col-md-4">
						<a href="<?php echo $image->link() ?>/" class="imglnk" data-slide-number="<?php echo $image->nr() ?>" >
							<img src="<?php echo $image->url() ?>"  alt="" class="img-fullwidth">
							<div class="overlay">
								<h3><?php echo $image->title() ?></h3>
					<? endforeach ?>
				<? endif ?>



1 Like

That fixed it indeed.

So stupid :smile: