diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-09-22 09:56:08 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-09-25 09:58:21 +0200 |
commit | 13b791c79c3b1aa69e51b640c84829b98cd50b03 (patch) | |
tree | 3fd1a3a5472b07c24e3a8af91e4138bd1c9b6f7c /ext/mysqlnd/mysqlnd_connection.c | |
parent | 17a789e27c31ca13ba4bab6fcfc265d2dd0589a2 (diff) | |
download | php-git-13b791c79c3b1aa69e51b640c84829b98cd50b03.tar.gz |
Normalize substr() behavior
Make the behavior of substr(), mb_substr(), iconv_substr() and
grapheme_substr() consistent when it comes to the handling of
out of bounds offsets. substr() will now always clamp out of
bounds offsets to the string boundary. Cases that previously
returned false will now return an empty string. This means that
substr() itself *always* returns a string now (like mb_substr()
already did before.)
Closes GH-6182.
Diffstat (limited to 'ext/mysqlnd/mysqlnd_connection.c')
0 files changed, 0 insertions, 0 deletions