Now spend your time debugging why $model->label has no value set.you are not seeing the value of $model->label even though you are clearly asking for it.
The echo too much
[...]
The true false
--------------
In the config file or wherever you are to provide a boolean value, put:
~~~
'someOption' => 'false',
~~~
Then read the PHP manual to find out why this does not evaluate to false like you wanted it to.
Rules for numbers
-----------------
[...]
array('count', 'numeric', 'integerOnly'=>true),
```
and only then look it up: 'numerical'.
Sure we have 'exists' method for CActiveRecord model, but ...
Ending ?> tag in non-view
---------------------------------
Extend a base class or edit a config file (needs to be included before the sessions starts) and leave a ?> at the ending with at least one trailing white space character. Make sure output buffering is off. Cry manly tears while trying to figure out why "Cannot modify header information - headers already sent" spams your log files.
Semicolon
---------
```php
$total = 0;
foreach($model->rels as $rel);
{
$total += $rel->count;
}
echo $total; // wrong result!!
```
I wasted 12 hours debugging this.
`visible` option in CMenu and `null` values
-----------------------------------------
Use a parameter `feature.enabled` to enable/disable a feature through configuration. And then wonder why you still see the menu item, even if you have no `feature.enabled` parameter at all.
`Yii::app()->params['feature.enabled']` returns `null` if the parameter is not defined. But in this case that's different from `false` because `CMenu` uses `isset($items['visible'])` which returns `false` for `null` values.