Skip to content

Commit d86decd

Browse files
committed
Merge branch 'PHP-5.3' of git.php.net:php-src into PHP-5.3
2 parents fa7e230 + 22fe268 commit d86decd

File tree

8 files changed

+39
-7
lines changed

8 files changed

+39
-7
lines changed

NEWS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3+
?? ??? 2013, PHP 5.3.21
4+
35
?? ??? 2012, PHP 5.3.20
46

7+
#### ADD NEWS TO 5.3.21 ONLY ####
8+
59
- Zend Engine:
610
. Fixed bug #63635 (Segfault in gc_collect_cycles). (Dmitry)
711
. Fixed bug #63512 (parse_ini_file() with INI_SCANNER_RAW removes quotes
@@ -18,6 +22,10 @@ PHP NEWS
1822
- Apache2 Handler SAPI:
1923
. Enabled Apache 2.4 configure option for Windows (Pierre, Anatoliy)
2024

25+
- Date:
26+
. Fixed bug #63435 (Datetime::format('u') sometimes wrong by 1 microsecon).
27+
(Remi)
28+
2129
- Fileinfo:
2230
. Fixed bug #63248 (Load multiple magic files from a directory under Windows).
2331
(Anatoliy)

configure.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ AC_CONFIG_HEADER(main/php_config.h)
4141

4242
PHP_MAJOR_VERSION=5
4343
PHP_MINOR_VERSION=3
44-
PHP_RELEASE_VERSION=20
44+
PHP_RELEASE_VERSION=21
4545
PHP_EXTRA_VERSION="-dev"
4646
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
4747
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`

ext/date/php_date.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1095,7 +1095,7 @@ static char *date_format(char *format, int format_len, timelib_time *t, int loca
10951095
case 'H': length = slprintf(buffer, 32, "%02d", (int) t->h); break;
10961096
case 'i': length = slprintf(buffer, 32, "%02d", (int) t->i); break;
10971097
case 's': length = slprintf(buffer, 32, "%02d", (int) t->s); break;
1098-
case 'u': length = slprintf(buffer, 32, "%06d", (int) floor(t->f * 1000000)); break;
1098+
case 'u': length = slprintf(buffer, 32, "%06d", (int) floor(t->f * 1000000 + 0.5)); break;
10991099

11001100
/* timezone */
11011101
case 'I': length = slprintf(buffer, 32, "%d", localtime ? offset->is_dst : 0); break;

ext/date/tests/bug45554.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ $d = date_create_from_format($format, "03-15-2005 12:22:29.000000 PST");
99
echo $d->format($format), "\n";
1010

1111
$d = date_create_from_format($format, "03-15-2005 12:22:29.001001 PST");
12-
echo $d->format($format), " (precision isn't enough to show the 1 here)\n";
12+
echo $d->format($format), "\n";
1313

1414
$d = date_create_from_format($format, "03-15-2005 12:22:29.0010 PST");
1515
echo $d->format($format), "\n";
1616
?>
1717
--EXPECT--
1818
03-15-2005 12:22:29.000000 PST
19-
03-15-2005 12:22:29.001000 PST (precision isn't enough to show the 1 here)
19+
03-15-2005 12:22:29.001001 PST
2020
03-15-2005 12:22:29.001000 PST

ext/date/tests/bug63435.phpt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--TEST--
2+
Bug #63435 Datetime::format('u') sometimes wrong by 1 microsecond
3+
--INI--
4+
date.timezone=UTC
5+
--FILE--
6+
<?php
7+
for ($i=1 ; $i<999 ; $i++) {
8+
$datetime = Datetime::createFromFormat("u", sprintf("%06ld", $i));
9+
$res = $datetime->format("u");
10+
if ($res != $i) {
11+
echo "$i != $res\n";
12+
}
13+
}
14+
echo "Done";
15+
--EXPECT--
16+
Done

main/php_version.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/* edit configure.in to change version number */
33
#define PHP_MAJOR_VERSION 5
44
#define PHP_MINOR_VERSION 3
5-
#define PHP_RELEASE_VERSION 20
5+
#define PHP_RELEASE_VERSION 21
66
#define PHP_EXTRA_VERSION "-dev"
7-
#define PHP_VERSION "5.3.20-dev"
8-
#define PHP_VERSION_ID 50320
7+
#define PHP_VERSION "5.3.21-dev"
8+
#define PHP_VERSION_ID 50321

tests/lang/034.phpt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ Bug #12647 (Locale settings affecting float parsing)
44
precision=14
55
--SKIPIF--
66
<?php # try to activate a german locale
7+
if (substr(PHP_OS, 0, 3) == 'WIN') {
8+
/* skip on windows until #63688 was fixed */
9+
die('skip');
10+
}
711
if (setlocale(LC_NUMERIC, "de_DE.UTF-8", "de_DE", "de", "german", "ge", "de_DE.ISO-8859-1") === FALSE) {
812
print "skip Can't find german locale";
913
}

tests/lang/bug30638.phpt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
Bug #30638 (localeconv returns wrong LC_NUMERIC settings) (ok to fail on MacOS X)
33
--SKIPIF--
44
<?php # try to activate a german locale
5+
if (substr(PHP_OS, 0, 3) == 'WIN') {
6+
/* skip on windows until #63688 was fixed */
7+
die('skip');
8+
}
59
if (setlocale(LC_NUMERIC, "de_DE.UTF-8", "de_DE", "de", "german", "ge", "de_DE.ISO-8859-1") === FALSE) {
610
print "skip setlocale() failed";
711
} elseif (strtolower(php_uname('s')) == 'darwin') {

0 commit comments

Comments
 (0)