File tree 1 file changed +18
-22
lines changed 1 file changed +18
-22
lines changed Original file line number Diff line number Diff line change @@ -1462,33 +1462,29 @@ PHPAPI zend_string *php_string_tolower(zend_string *s)
1462
1462
unsigned char * c ;
1463
1463
const unsigned char * e ;
1464
1464
1465
- if (EXPECTED (!BG (locale_changed ))) {
1466
- return zend_string_tolower (s );
1467
- } else {
1468
- c = (unsigned char * )ZSTR_VAL (s );
1469
- e = c + ZSTR_LEN (s );
1465
+ c = (unsigned char * )ZSTR_VAL (s );
1466
+ e = c + ZSTR_LEN (s );
1470
1467
1471
- while (c < e ) {
1472
- if (isupper (* c )) {
1473
- register unsigned char * r ;
1474
- zend_string * res = zend_string_alloc (ZSTR_LEN (s ), 0 );
1468
+ while (c < e ) {
1469
+ if (isupper (* c )) {
1470
+ register unsigned char * r ;
1471
+ zend_string * res = zend_string_alloc (ZSTR_LEN (s ), 0 );
1475
1472
1476
- if (c != (unsigned char * )ZSTR_VAL (s )) {
1477
- memcpy (ZSTR_VAL (res ), ZSTR_VAL (s ), c - (unsigned char * )ZSTR_VAL (s ));
1478
- }
1479
- r = c + (ZSTR_VAL (res ) - ZSTR_VAL (s ));
1480
- while (c < e ) {
1481
- * r = tolower (* c );
1482
- r ++ ;
1483
- c ++ ;
1484
- }
1485
- * r = '\0' ;
1486
- return res ;
1473
+ if (c != (unsigned char * )ZSTR_VAL (s )) {
1474
+ memcpy (ZSTR_VAL (res ), ZSTR_VAL (s ), c - (unsigned char * )ZSTR_VAL (s ));
1487
1475
}
1488
- c ++ ;
1476
+ r = c + (ZSTR_VAL (res ) - ZSTR_VAL (s ));
1477
+ while (c < e ) {
1478
+ * r = tolower (* c );
1479
+ r ++ ;
1480
+ c ++ ;
1481
+ }
1482
+ * r = '\0' ;
1483
+ return res ;
1489
1484
}
1490
- return zend_string_copy ( s ) ;
1485
+ c ++ ;
1491
1486
}
1487
+ return zend_string_copy (s );
1492
1488
}
1493
1489
/* }}} */
1494
1490
You can’t perform that action at this time.
0 commit comments