- Code: Select all
foreach($image->ImageTypes as $imageType) {
if($imageType->slug == 'main-news') {
$this->mainImage = $image;
}
}
I get this error:
- Code: Select all
Warning: Invalid argument supplied for foreach() in /var/www/tdf/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Table.php on line 1292
This table is many on many relation.
Image <-> ImageImageType <-> ImageType
I do get the imagetype back, and if I dont have frontend_dev.php on I dont see the error and the page loads correct.
How do I fix this ?
If you need more info, please ask.
Thanks,
