mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Added default value for limit on LimitCharacters() to prevent backwards-compat issue (fixes 0c3af805
)
This commit is contained in:
parent
4d0d5799bb
commit
60ced3b167
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user