Fix spelling of $add_ellipses is comment.

Created on 22 June 2023, almost 2 years ago
Updated 5 July 2023, almost 2 years ago

Problem/Motivation

In https://git.drupalcode.org/project/drupal/-/blob/11.x/core/lib/Drupal/Co... L300 there is a spelling error in a comment which refers to $add_ellipses - the correct variable to reference should be $add_ellipsis.

   * @param int $min_wordsafe_length
   *   If $wordsafe is TRUE, the minimum acceptable length for truncation (before
   *   adding an ellipsis, if $add_ellipsis is TRUE). Has no effect if $wordsafe
   *   is FALSE. This can be used to prevent having a very short resulting string
   *   that will not be understandable. For instance, if you are truncating the
   *   string "See myverylongurlexample.com for more information" to a word-safe
   *   return length of 20, the only available word boundary within 20 characters
   *   is after the word "See", which wouldn't leave a very informative string. If
   *   you had set $min_wordsafe_length to 10, though, the function would realise
   *   that "See" alone is too short, and would then just truncate ignoring word
   *   boundaries, giving you "See myverylongurl..." (assuming you had set
   *   $add_ellipses to TRUE).

Proposed resolution

Change $add_ellipses to $add_ellipsis

📌 Task
Status

Fixed

Version

10.1

Component
Other 

Last updated about 15 hours ago

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024