Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #1861 #1868

Merged
merged 4 commits into from Dec 20, 2012
Merged

Fixes #1861 #1868

merged 4 commits into from Dec 20, 2012

Conversation

resurtm
Copy link
Contributor

@resurtm resurtm commented Dec 19, 2012

Fixes #1861.

return $defaultValue;
}
else
if(is_callable($attribute))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. is_callable isn't too slow comparing with is_string: http://liveworkspace.org/code/2664hV$3
  2. is_string replaced with is_callable because create_function() returns string.

@ghost ghost assigned mdomba Dec 20, 2012
mdomba added a commit that referenced this pull request Dec 20, 2012
@mdomba mdomba merged commit d754c54 into yiisoft:master Dec 20, 2012
@MonkeyMaster
Copy link

New code brings more serious issue:
If a model has property named as some php function (for example, sort) CHtml::value() now tries to call that function!

CHtml::value($model, 'sort') results in Parameter 1 to sort() expected to be a reference, value given

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CHtml::value() in 1.1.13: replace is_string with is_scalar
3 participants