diff options
author | friendica <info@friendica.com> | 2012-01-02 22:58:09 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-01-02 22:58:09 -0800 |
commit | 184230e06826117b1d87241e3acdf19935470e8f (patch) | |
tree | fb45df9a3b7396a80db23e9d00a0a3aa9b4f498f /include/conversation.php | |
parent | 0db637bf006ba1869ee72239c7d9964894cdf575 (diff) | |
download | volse-hubzilla-184230e06826117b1d87241e3acdf19935470e8f.tar.gz volse-hubzilla-184230e06826117b1d87241e3acdf19935470e8f.tar.bz2 volse-hubzilla-184230e06826117b1d87241e3acdf19935470e8f.zip |
check count before foreach
Diffstat (limited to 'include/conversation.php')
-rw-r--r-- | include/conversation.php | 5 |
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; |