Update Composer, update everything
This commit is contained in:
parent
ea3e94409f
commit
dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions
|
|
@ -81,17 +81,17 @@ function text_summary($text, $format = NULL, $size = NULL) {
|
|||
|
||||
// Retrieve the filters of the specified text format, if any.
|
||||
if (isset($format)) {
|
||||
$filters = FilterFormat::load($format)->filters();
|
||||
$filter_format = FilterFormat::load($format);
|
||||
// If the specified format does not exist, return nothing. $text is already
|
||||
// filtered text, but the remainder of this function will not be able to
|
||||
// ensure a sane and secure summary.
|
||||
if (!$filters) {
|
||||
if (!$filter_format || !($filters = $filter_format->filters())) {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
// If we have a short body, the entire body is the summary.
|
||||
if (Unicode::strlen($text) <= $size) {
|
||||
if (mb_strlen($text) <= $size) {
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue