diff options
author | Michael Francis <edude03@gmail.com> | 2011-06-22 15:53:30 -0400 |
---|---|---|
committer | Michael Francis <edude03@gmail.com> | 2011-06-22 15:53:30 -0400 |
commit | e5f82351307bc1a2e026679fea76cda94a51f0ec (patch) | |
tree | ef7bf9f04b7eaca5ef44f3a43ec2f8b6c43a85e6 /views | |
parent | 8a2d191637946e4a738979ba01d47869463c8372 (diff) | |
download | otakuhub-e5f82351307bc1a2e026679fea76cda94a51f0ec.tar.xz |
Makes sure that there is posts before trying to display them (regression)
Diffstat (limited to 'views')
-rw-r--r-- | views/Users/feed.html.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/views/Users/feed.html.php b/views/Users/feed.html.php index 29d8695..142fe7a 100644 --- a/views/Users/feed.html.php +++ b/views/Users/feed.html.php @@ -18,7 +18,9 @@ <?= $this->form->submit('Post!', array('class' => 'button', 'style' => 'float:right')); ?> <?= $this->form->end(); ?> <br class ="cl"> - <?php foreach($feed as $post) { ?> + + <?php if(isset($feed)): ?> + <?php foreach($feed as $post): ?> <div class="grid_4"><img class="inlinepic" src="/img/about.jpg" alt="" /></div> <div class="grid_8"> <h4><?= $post->username ?></h4> @@ -38,7 +40,10 @@ </ul> </div> <br class="cl"> - <?php } ?> + <?php endforeach; ?> + <?php else: ?> + <p>Woops! There's no posts yet. Make some friends and get the party started!</p> + <?php endif; ?> </div> <br class="cl" /> <br class="cl" />
\ No newline at end of file |