Skip to content

Commit 162776a

Browse files
committed
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Fixed bug #79849
2 parents 7a39e17 + ce149b0 commit 162776a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ext/standard/string.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2807,8 +2807,9 @@ PHP_FUNCTION(chr)
28072807
Uppercase the first character of the word in a native string */
28082808
static zend_string* php_ucfirst(zend_string *str)
28092809
{
2810-
unsigned char r = toupper(ZSTR_VAL(str)[0]);
2811-
if (r == ZSTR_VAL(str)[0]) {
2810+
const unsigned char ch = ZSTR_VAL(str)[0];
2811+
unsigned char r = toupper(ch);
2812+
if (r == ch) {
28122813
return zend_string_copy(str);
28132814
} else {
28142815
zend_string *s = zend_string_init(ZSTR_VAL(str), ZSTR_LEN(str), 0);

0 commit comments

Comments
 (0)