BUGFIX: Added default value for limit on LimitCharacters() to prevent backwards-compat issue (fixes 0c3af805)

This commit is contained in:
Sam Minnee 2011-12-17 16:41:54 +13:00
parent 4d0d5799bb
commit 60ced3b167

View File

@ -83,7 +83,7 @@ abstract class StringField extends DBField {
* @param string $add Ellipsis to add to the end of truncated string
* @return string
*/
function LimitCharacters($limit, $add = '...') {
function LimitCharacters($limit = 20, $add = '...') {
$value = trim($this->value);
if($this->stat('escape_type') == 'xml') {
$value = strip_tags($value);