aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-01-02 22:58:09 -0800
committerfriendica <info@friendica.com>2012-01-02 22:58:09 -0800
commit184230e06826117b1d87241e3acdf19935470e8f (patch)
treefb45df9a3b7396a80db23e9d00a0a3aa9b4f498f
parent0db637bf006ba1869ee72239c7d9964894cdf575 (diff)
downloadvolse-hubzilla-184230e06826117b1d87241e3acdf19935470e8f.tar.gz
volse-hubzilla-184230e06826117b1d87241e3acdf19935470e8f.tar.bz2
volse-hubzilla-184230e06826117b1d87241e3acdf19935470e8f.zip
check count before foreach
-rw-r--r--include/conversation.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/conversation.php b/include/conversation.php
index d40b2ea7e..f4432bfd9 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -918,8 +918,9 @@ function conv_sort($arr,$order) {
$ret = array();
foreach($parents as $x) {
$ret[] = $x;
- foreach($x['children'] as $y)
- $ret[] = $y;
+ if(count($x['children']))
+ foreach($x['children'] as $y)
+ $ret[] = $y;
}
return $ret;