Skip to content

Commit 29e755a

Browse files
Merge branch 'PHP-5.4' into JSONWhitespaceFix
2 parents 8495d63 + b0a3600 commit 29e755a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1737
-932
lines changed

CODING_STANDARDS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ Naming Conventions
151151

152152
7. Classes should be given descriptive names. Avoid using abbreviations where
153153
possible. Each word in the class name should start with a capital letter,
154-
without underscore delimiters (CampelCaps starting with a capital letter).
154+
without underscore delimiters (CamelCaps starting with a capital letter).
155155
The class name should be prefixed with the name of the 'parent set' (e.g.
156156
the name of the extension)::
157157

NEWS

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,59 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3+
?? ??? 2013, PHP 5.4.22
4+
5+
- CLI server:
6+
. Fixed bug #65818 (Segfault with built-in webserver and chunked transfer
7+
encoding). (Felipe)
8+
9+
- FTP:
10+
. Fixed bug #65667 (ftp_nb_continue produces segfault). (Philip Hofstetter)
11+
12+
- Sockets:
13+
. Fixed bug #65808 (the socket_connect() won't work with IPv6 address).
14+
(Mike)
15+
16+
- XMLReader:
17+
. Fixed bug #51936 (Crash with clone XMLReader). (Mike)
18+
. Fixed bug #64230 (XMLReader does not suppress errors). (Mike)
19+
20+
321
?? ??? 2013, PHP 5.4.21
422

5-
?? ??? 2013, PHP 5.4.20
23+
- Core:
24+
. Fixed bug #65322 (compile time errors won't trigger auto loading). (Nikita)
25+
26+
- CLI server:
27+
. Fixed bug #65633 (built-in server treat some http headers as
28+
case-sensitive). (Adam)
29+
30+
- Datetime:
31+
. Fixed bug #64157 (DateTime::createFromFormat() reports confusing error
32+
message). (Boro Sitnikovski)
33+
34+
- DBA extension:
35+
. Fixed bug #65708 (dba functions cast $key param to string in-place,
36+
bypassing copy on write). (Adam)
37+
38+
- Filter:
39+
. Add RFC 6598 IPs to reserved addresses. (Sebastian Nohn)
40+
. Fixed bug #64441 (FILTER_VALIDATE_URL rejects fully qualified domain names).
41+
(Syra)
42+
43+
- IMAP:
44+
. Fixed bug #65721 (configure script broken in 5.5.4 and 5.4.20 when enabling
45+
imap). (ryotakatsuki at gmail dot com)
46+
47+
- Standard:
48+
. Fixed bug #61548 (content-type must appear at the end of headers for 201
49+
Location to work in http). (Mike)
50+
51+
- Build system:
52+
. Fixed bug #62396 ('make test' crashes starting with 5.3.14 (missing
53+
gzencode())). (Mike)
54+
55+
56+
19 Sep 2013, PHP 5.4.20
657

758
- Core:
859
. Fixed bug #60598 (cli/apache sapi segfault on objects manipulation).

README.EXTENSIONS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ zend_module_entry foo_module_entry = {
3030
PHP_RSHUTDOWN(foo), /* per-request shutdown function */
3131
PHP_MINFO(foo), /* information function */
3232
#if ZEND_MODULE_API_NO >= 20010901
33-
FOO_VERSION, /* extension version number (string) */
33+
PHP_FOO_VERSION, /* extension version number (string) */
3434
#endif
3535
STANDARD_MODULE_PROPERTIES
3636
};

README.EXT_SKEL

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ HOW TO USE IT
3131

3232
./buildconf; ./configure --enable-module_name; make
3333

34+
The definition of PHP_MODULE_NAME_VERSION will be present in the
35+
php_module_name.h and injected into the zend_module_entry definition. This
36+
is required by the PECL website for the version string conformity checks
37+
against package.xml
38+
3439
But if you already have planned the overall scheme of your module, what
3540
functions it will contain, their return types and the arguments they take
3641
(a very good idea) and don't want to bother yourself with creating function

README.SELF-CONTAINED-EXTENSIONS

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,18 @@ ADDING SHARED MODULE SUPPORT TO A MODULE
153153
#ifdef COMPILE_DL_FOO
154154
ZEND_GET_MODULE(foo)
155155
#endif
156+
157+
PECL SITE CONFORMITY
158+
159+
If you plan to release an extension to the PECL website, there are several
160+
points to be regarded.
161+
162+
1. Add LICENSE or COPYING to the package.xml
163+
164+
2. The following should be defined in one of the extension header files
165+
166+
#define PHP_FOO_VERSION "1.2.3"
167+
168+
This macros has to be used within your foo_module_entry to indicate the
169+
extension version.
170+

Zend/tests/bug65322.phpt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
--TEST--
2+
Bug #65322: compile time errors won't trigger auto loading
3+
--FILE--
4+
<?php
5+
6+
spl_autoload_register(function($class) {
7+
var_dump($class);
8+
class B {}
9+
});
10+
11+
set_error_handler(function($_, $msg, $file) {
12+
var_dump($msg, $file);
13+
new B;
14+
});
15+
16+
eval('class A { function a() {} function __construct() {} }');
17+
18+
?>
19+
--EXPECTF--
20+
string(50) "Redefining already defined constructor for class A"
21+
string(%d) "%s(%d) : eval()'d code"
22+
string(1) "B"

Zend/tests/errmsg_045.phpt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
--TEST--
2+
Error message in error handler during compilation
3+
--FILE--
4+
<?php
5+
6+
set_error_handler(function($_, $msg, $file) {
7+
var_dump($msg, $file);
8+
echo $undefined;
9+
});
10+
11+
eval('class A { function a() {} function __construct() {} }');
12+
13+
?>
14+
--EXPECTF--
15+
string(50) "Redefining already defined constructor for class A"
16+
string(%d) "%s(%d) : eval()'d code"
17+
18+
Notice: Undefined variable: undefined in %s on line %d

Zend/zend.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,7 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
11831183
* such scripts recursivly, but some CG() variables may be
11841184
* inconsistent. */
11851185

1186-
in_compilation = zend_is_compiling(TSRMLS_C);
1186+
in_compilation = CG(in_compilation);
11871187
if (in_compilation) {
11881188
saved_class_entry = CG(active_class_entry);
11891189
CG(active_class_entry) = NULL;
@@ -1195,6 +1195,7 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
11951195
SAVE_STACK(declare_stack);
11961196
SAVE_STACK(list_stack);
11971197
SAVE_STACK(context_stack);
1198+
CG(in_compilation) = 0;
11981199
}
11991200

12001201
if (call_user_function_ex(CG(function_table), NULL, orig_user_error_handler, &retval, 5, params, 1, NULL TSRMLS_CC) == SUCCESS) {
@@ -1219,6 +1220,7 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
12191220
RESTORE_STACK(declare_stack);
12201221
RESTORE_STACK(list_stack);
12211222
RESTORE_STACK(context_stack);
1223+
CG(in_compilation) = 1;
12221224
}
12231225

12241226
if (!EG(user_error_handler)) {

configure.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
119119

120120
PHP_MAJOR_VERSION=5
121121
PHP_MINOR_VERSION=4
122-
PHP_RELEASE_VERSION=21
122+
PHP_RELEASE_VERSION=22
123123
PHP_EXTRA_VERSION="-dev"
124124
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
125125
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`

ext/date/lib/parse_date.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25036,7 +25036,7 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim
2503625036
TIMELIB_CHECK_NUMBER;
2503725037
sec = timelib_get_nr_ex((char **) &ptr, 2, &length);
2503825038
if (sec == TIMELIB_UNSET || length != 2) {
25039-
add_pbf_error(s, "A two second minute could not be found", string, begin);
25039+
add_pbf_error(s, "A two digit second could not be found", string, begin);
2504025040
} else {
2504125041
s->time->s = sec;
2504225042
}

ext/date/lib/parse_date.re

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2043,7 +2043,7 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim
20432043
TIMELIB_CHECK_NUMBER;
20442044
sec = timelib_get_nr_ex((char **) &ptr, 2, &length);
20452045
if (sec == TIMELIB_UNSET || length != 2) {
2046-
add_pbf_error(s, "A two second minute could not be found", string, begin);
2046+
add_pbf_error(s, "A two digit second could not be found", string, begin);
20472047
} else {
20482048
s->time->s = sec;
20492049
}

0 commit comments

Comments
 (0)