sonata-project/SonataBlockBundle — pull request #26 by eluceo (2012-09-07 16:04:17+00:00)
Title: Bug when using BlockService without children

If a BlockService is used without a Block instance (see example) an error will occur because BaseBlock::$children is not initialized.

```twig
{{ sonata_block_render({'type':'...'}) }}
```

ErrorException: Warning: Invalid argument supplied for foreach() in ... vendor/sonata-project/block-bundle/Sonata/BlockBundle/Model/BaseBlock.php line 263

This bug will be fixed by initalizing BaseBlock::$children with an empty array.