check count before foreach

This commit is contained in:
friendica 2012-01-02 22:58:09 -08:00
parent 0db637bf00
commit 184230e068

View file

@ -918,6 +918,7 @@ function conv_sort($arr,$order) {
$ret = array();
foreach($parents as $x) {
$ret[] = $x;
if(count($x['children']))
foreach($x['children'] as $y)
$ret[] = $y;
}