JaquelineBrandao / yii

Automatically exported from code.google.com/p/yii
0 stars 0 forks source link

[PATCH] CComponent dead code in __get() #945

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi Qiang

CComponent::__get() seems to have some dead code in it which gives no more
sense, introducing unintended behavior, possibly escalating into bugs.

Here's my weekly patch :-)

Original issue reported on code.google.com by flavius...@gmail.com on 19 Feb 2010 at 1:48

Attachments:

GoogleCodeExporter commented 9 years ago
The patch is incorrect. The original code intends to achieve:
1. when $name refers to a behavior name, then return the behavior object;
2. otherwise, check every attached behavior and see if $name refers to a 
property of
it. If so, return the named property value of the behavior.

Original comment by qiang.xue on 19 Feb 2010 at 9:54