- Fixed bug #40036 (empty() does not work correctly with ArrayObject when using
ARRAY_AS_PROPS). (Ilia)
- Fixed bug #40002 (Try/Catch performs poorly). (Dmitry)
+- Fixed bug #39993 (tr_TR.UTF-8 locale has problems with PHP). (Ilia)
- Fixed bug #39990 (Cannot "foreach" over overloaded properties). (Dmitry)
- Fixed bug #39988 (type argument of oci_define_by_name() is ignored).
(Chris Jones, Tony)
#include "timelib.h"
#include <stdio.h>
+#include <locale.h>
#ifdef HAVE_STRING_H
#include <string.h>
static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const timelib_tzdb *tzdb)
{
int left = 0, right = tzdb->index_size - 1;
+ char *cur_locale = setlocale(LC_CTYPE, "C");
do {
int mid = ((unsigned)left + right) >> 1;
left = mid + 1;
} else { /* (cmp == 0) */
(*tzf) = &(tzdb->data[tzdb->index[mid].pos + 20]);
+ setlocale(LC_CTYPE, cur_locale);
return 1;
}
} while (left <= right);
+ setlocale(LC_CTYPE, cur_locale);
return 0;
}