[TYPO3-ttnews] tx_news - Extend news fields with custom extension
bernd wilke
t3ng at bernd-wilke.net
Thu Jul 11 08:45:01 CEST 2013
Am 10.07.13 19:44, schrieb Georg Ringer:
> Am 10.07.2013 17:35, schrieb bernd wilke:
>
>> 459 $categories = $this->getCategories();
>
> maybe do there something like if (!is_null($categories)) {
as this file is a copy from ext:news maybe this should be done in the
news extension? ;-)
>> 460 $categories->rewind();
>> 461
>> 462 return $categories->current();
>
> }
>> 463 }
>
changing this method in ext:news/Classes/Domain/Model/News.php to
public function getFirstCategory() {
$categories = $this->getCategories();
if (!is_null($categories)) {
$categories->rewind();
return $categories->current();
} else {
return null;
}
}
helped.
=> http://forge.typo3.org/issues/49876
bernd
--
http://www.pi-phi.de/cheatsheet.html
More information about the TYPO3-project-tt-news
mailing list