Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix for bug #18556 #79

Closed
wants to merge 1 commit into from

3 participants

@netnet

Patch to avoid locale-aware lowercasing for letter 'I' in zend_str_tolower() and friends.

@avar

This fix looks like a crazy hack, the real solution to this is to change the comparison functions for identifiers not to be locale dependent, not hack around a specific locale and its treatment of the letter "i" in a low-level copying function.

@php-pulls
Collaborator

Comment on behalf of stas at php.net:

other fix will be done.

@php-pulls php-pulls closed this
@php-pulls php-pulls referenced this pull request from a commit
@dstogov dstogov Merge branch 'PHP-5.5'
* PHP-5.5:
  Fixed issue #79 (Optimization Problem/Bug)
  fix coverage data for the opcache optimizer
71a45be
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 10, 2012
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 2 deletions.
  1. +3 −2 Zend/zend_operators.c
View
5 Zend/zend_operators.c
@@ -1907,7 +1907,8 @@ ZEND_API char *zend_str_tolower_copy(char *dest, const char *source, unsigned in
register unsigned char *end = str + length;
while (str < end) {
- *result++ = zend_tolower((int)*str++);
+ *result++ = (*str == 'I') ? 'i' : zend_tolower((int)*str);
+ str++;
}
*result = '\0';
@@ -1927,7 +1928,7 @@ ZEND_API void zend_str_tolower(char *str, unsigned int length) /* {{{ */
register unsigned char *end = p + length;
while (p < end) {
- *p = zend_tolower((int)*p);
+ *p = (*p == 'I') ? 'i' : zend_tolower((int)*p);
p++;
}
}
Something went wrong with that request. Please try again.