Commit version 24.12.13800

This commit is contained in:
2025-01-06 17:35:06 -05:00
parent b7f6a79c2c
commit 55d9218816
6133 changed files with 4239740 additions and 1374287 deletions

View File

@ -94,7 +94,7 @@ function input( $format = null ) {
* continue displaying until input is received.
*
* @param string $question The question to ask the user.
* @param string $default A default value if the user provides no input.
* @param string|false $default A default value if the user provides no input. Default false.
* @param string $marker A string to append to the question and default value on display.
* @param boolean $hide If the user input should be hidden
* @return string The users input.
@ -289,7 +289,7 @@ function _safe_substr_eaw( $str, $length ) {
if ( $width < 0 && $length > 1 ) {
$length--;
}
return join( '', array_slice( $chars, 0, $length ) );
return implode('', array_slice($chars, 0, $length ) );
}
}
return $str;
@ -319,6 +319,8 @@ function safe_str_pad( $string, $length, $encoding = false ) {
* @return int The string's width.
*/
function strwidth( $string, $encoding = false ) {
$string = (string) $string;
// Set the East Asian Width and Mark regexs.
list( $eaw_regex, $m_regex ) = get_unicode_regexs();