Keyword

Error on item.php when author have only 1 article

  • lucasdeg
  • lucasdeg's Avatar Topic Author
  • Offline
  • New Member
More
13 years 7 months ago #94518 by lucasdeg
The following message displays on my item view when the author of the current item has only one article published...

 

Warning: Invalid argument supplied for foreach() in /home/mixsites/sites/coronel/templates/pangea/html/com_k2/blog/item.php on line 522

 

 

Checking the item.php I have:

 

<!-- Latest items from author -->    <div class="itemAuthorLatest">        <h3><?php echo JText::_("Latest from"); ?> <?php echo $this->item->author->name; ?></h3>        <ul>            <?php foreach($this->authorLatestItems as $key=>$item): ?>            <li class="<?php echo ($key%2) ? "odd" : "even"; ?>">                <a href="<?php echo $item->link ?>"><?php echo $item->title; ?></a>            </li>            <?php endforeach; ?>        </ul>        <div class="clr"></div>    </div>    </div>  <?php endif; ?>    <?php if($this->item->params->get('itemRelated') && isset($this->relatedItems)): ?>  <!-- Related items by tag -->

 

 

Here´s a link to the live site:

 

www.emebcoronel.com/index.php?option=com_k2&view=item&id=60:mat%C3%A9ria-do-1%C2%BA-bimestre

 

Can anyone help me solve this problem?? Thanks

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum