zendframework/zf2 — pull request #895 by matuszemi (2012-03-07 01:58:53+00:00)
Title: View Model DI constructor support

I changed ViewModel constructor so it can be implicitly created by DI automatically.

Simply if $options == null we should not call setOptions() method.
Otherwise we get exception:
Zend\View\Model\ViewModel::setOptions: expects an array, or Traversable argument; received "NULL"