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

Display 0 integer values #5

Closed
arogachev opened this issue Aug 26, 2014 · 0 comments
Closed

Display 0 integer values #5

arogachev opened this issue Aug 26, 2014 · 0 comments
Labels

Comments

@arogachev
Copy link

0 integer value is treated as "null" and "not set" message appears.
This is because of this empty check:

if (empty($this->valueIfNull)) {
    $this->valueIfNull = '<em>' . Yii::t('kveditable', '(not set)') . '</em>';
}

The workaround I used is setting 'valueIfNull' option to some html string, for example like this: <span>0</span>. As i remember in framework itself the value is treated as "not set" only if it's null.
Does not seem like a big problem, but I think it's better to display 'not set' only if value is null by default.

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

No branches or pull requests

2 participants