superles / gii-template-collection

Automatically exported from code.google.com/p/gii-template-collection
0 stars 0 forks source link

Menu does not get prepared #43

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Generate a fullCrud for fullModel
2. GoTo admin action

What is the expected output? What do you see instead?
The admin/manage screen.

But I get an PHP error:
PHP Error
Invalid argument supplied for foreach()
/Users/tobias/Webserver/NetBeans/maybach-webart/lib/yii/zii/widgets/CMenu.php(24
5)

Fix for fullCrud/templates/admin, line 11:
if(!isset($this->breadcrumbs)) 
should be 
if(!isset($this->menu))

Original issue reported on code.google.com by schm...@usrbin.de on 14 Jun 2011 at 4:47

GoogleCodeExporter commented 8 years ago
Can I fix this and commit?
I do not see why the current code would make sense?!

Original comment by schm...@usrbin.de on 14 Jun 2011 at 4:48

GoogleCodeExporter commented 8 years ago
Even better would be 
if(count($this->menu) === 0)
because 'Controller' defines $menu = array() and so it's always set.

Original comment by schm...@usrbin.de on 17 Jun 2011 at 4:10

GoogleCodeExporter commented 8 years ago

Original comment by schm...@usrbin.de on 27 Jun 2011 at 1:05