Skip to content

Commit 66e1ac2

Browse files
committed
Merge branch 'PHP-5.4' of ssh://git.php.net/php-src into PHP-5.4
2 parents 555db7d + 2032470 commit 66e1ac2

Some content is hidden

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

64 files changed

+481
-366
lines changed

NEWS

Lines changed: 125 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3+
?? ??? 2012, PHP 5.4.6
4+
5+
- CURL:
6+
. Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, "") returns false).
7+
([email protected], Laruence)
8+
9+
- DateTime:
10+
. Fixed Bug #62500 (Segfault in DateInterval class when extended). (Laruence)
11+
12+
- SimpleXML:
13+
. Implemented FR #55218 Get namespaces from current node. (Lonny)
14+
315
?? ??? 2012, PHP 5.4.5
416

517
- Core:
618
. Fixed bug #62443 (Crypt SHA256/512 Segfaults With Malformed
719
Salt). (Anthony Ferrara)
20+
. Fixed bug #62432 (ReflectionMethod random corrupt memory on high
21+
concurrent). (Johannes)
22+
. Fixed bug #62373 (serialize() generates wrong reference to the object).
23+
(Moriyoshi)
824
. Fixed bug #62357 (compile failure: (S) Arguments missing for built-in
925
function __memcmp). (Laruence)
1026
. Fixed bug #61998 (Using traits with method aliases appears to result in
@@ -46,11 +62,18 @@ PHP NEWS
4662
. Fixed bug #62070 (Collator::getSortKey() returns garbage). (Gustavo)
4763
. Fixed bug #62017 (datefmt_create with incorrectly encoded timezone leaks
4864
pattern). (Gustavo)
65+
. Fixed bug #60785 (memory leak in IntlDateFormatter constructor). (Gustavo)
66+
67+
- JSON:
68+
. Fixed bug #61359 (json_encode() calls too many reallocs). (Stas)
4969

5070
- libxml:
5171
. Fixed bug #62266 (Custom extension segfaults during xmlParseFile with FPM
5272
SAPI). (Gustavo)
5373

74+
- Phar:
75+
. Fixed bug #62227 (Invalid phar stream path causes crash). (Felipe)
76+
5477
- Readline:
5578
. Fixed bug #62186 (readline fails to compile - void function should not
5679
return a value). (Johannes)
@@ -64,6 +87,12 @@ PHP NEWS
6487
- Sockets:
6588
. Fixed bug #62025 (__ss_family was changed on AIX 5.3). (Felipe)
6689

90+
- SPL:
91+
. Fixed bug #62433 (Inconsistent behavior of RecursiveDirectoryIterator to
92+
dot files). (Laruence)
93+
. Fixed bug #62262 (RecursiveArrayIterator does not implement Countable).
94+
(Nikita Popov)
95+
6796
- XML Writer:
6897
. Fixed bug #62064 (memory leak in the XML Writer module).
6998
(jean-pierre dot lozi at lip6 dot fr)
@@ -85,10 +114,6 @@ PHP NEWS
85114
. Fixed bug #61546 (functions related to current script failed when chdir()
86115
in cli sapi). (Laruence, [email protected])
87116

88-
- CURL:
89-
. Fixed bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction).
90-
(Laruence)
91-
92117
- Core:
93118
. Fixed missing bound check in iptcparse(). (chris at chiappa.net)
94119
. Fixed CVE-2012-2143. (Solar Designer)
@@ -103,12 +128,15 @@ PHP NEWS
103128
. Fixed bug #61827 (incorrect \e processing on Windows) (Anatoliy)
104129
. Fixed bug #61782 (__clone/__destruct do not match other methods when checking
105130
access controls). (Stas)
131+
. Fixed bug #61764 ('I' unpacks n as signed if n > 2^31-1 on LP64). (Gustavo)
106132
. Fixed bug #61761 ('Overriding' a private static method with a different
107133
signature causes crash). (Laruence)
108134
. Fixed bug #61730 (Segfault from array_walk modifying an array passed by
109135
reference). (Laruence)
110136
. Fixed bug #61728 (PHP crash when calling ob_start in request_shutdown
111137
phase). (Laruence)
138+
. Fixed bug #61713 (Logic error in charset detection for htmlentities).
139+
(Anatoliy)
112140
. Fixed bug #61660 (bin2hex(hex2bin($data)) != $data). (Nikita Popov)
113141
. Fixed bug #61650 (ini parser crashes when using ${xxxx} ini variables
114142
(without apache2)). (Laruence)
@@ -118,15 +146,9 @@ PHP NEWS
118146
set to null). (Anatoliy)
119147
. Changed php://fd to be available only for CLI.
120148

121-
- PDO:
122-
. Fixed bug #61755 (A parsing bug in the prepared statements can lead to
123-
access violations). (Johannes)
124-
125-
- Phar:
126-
. Fix bug #61065 (Secunia SA44335, CVE-2012-2386). (Rasmus)
127-
128-
- Pgsql:
129-
. Added pg_escape_identifier/pg_escape_literal. (Yasuo Ohgaki)
149+
- CURL:
150+
. Fixed bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction).
151+
(Laruence)
130152

131153
- Fileinfo
132154
. Fixed bug #61812 (Uninitialised value used in libmagic).
@@ -144,6 +166,20 @@ PHP NEWS
144166
. Fixed bug #61617 (Libxml tests failed(ht is already destroyed)).
145167
(Laruence)
146168

169+
- PDO:
170+
. Fixed bug #61755 (A parsing bug in the prepared statements can lead to
171+
access violations). (Johannes)
172+
173+
- Phar:
174+
. Fixed bug #61065 (Secunia SA44335, CVE-2012-2386). (Rasmus)
175+
176+
- Pgsql:
177+
. Added pg_escape_identifier/pg_escape_literal. (Yasuo Ohgaki)
178+
179+
- Streams:
180+
. Fixed bug #61961 (file_get_contents leaks when access empty file with
181+
maxlen set). (Reeze)
182+
147183
- Zlib:
148184
. Fixed bug #61820 (using ob_gzhandler will complain about headers already
149185
sent when no compression). (Mike)
@@ -232,23 +268,6 @@ PHP NEWS
232268
. Fixed bug #60948 (mysqlnd FTBFS when -Wformat-security is enabled).
233269
(Johannes)
234270

235-
- Readline:
236-
. Fixed bug #61088 (Memory leak in readline_callback_handler_install).
237-
(Nikic, Laruence)
238-
239-
- Session
240-
. Fixed bug #60634 (Segmentation fault when trying to die() in
241-
SessionHandler::write()). (Ilia)
242-
243-
- SOAP
244-
. Fixed bug #61423 (gzip compression fails). (Ilia)
245-
. Fixed bug #60887 (SoapClient ignores user_agent option and sends no
246-
User-Agent header). (carloschilazo at gmail dot com)
247-
. Fixed bug #60842, #51775 (Chunked response parsing error when
248-
chunksize length line is > 10 bytes). (Ilia)
249-
. Fixed bug #49853 (Soap Client stream context header option ignored).
250-
(Dmitry)
251-
252271
- PDO
253272
. Fixed bug #61292 (Segfault while calling a method on an overloaded PDO
254273
object). (Laruence)
@@ -266,12 +285,29 @@ PHP NEWS
266285
. Fixed bug #61184 (Phar::webPhar() generates headers with trailing NUL
267286
bytes). (Nikita Popov)
268287

288+
- Readline:
289+
. Fixed bug #61088 (Memory leak in readline_callback_handler_install).
290+
(Nikic, Laruence)
291+
269292
- Reflection:
270293
. Implemented FR #61602 (Allow access to the name of constant
271294
used as function/method parameter's default value). ([email protected])
272295
. Fixed bug #60968 (Late static binding doesn't work with
273296
ReflectionMethod::invokeArgs()). (Laruence)
274297

298+
- Session
299+
. Fixed bug #60634 (Segmentation fault when trying to die() in
300+
SessionHandler::write()). (Ilia)
301+
302+
- SOAP
303+
. Fixed bug #61423 (gzip compression fails). (Ilia)
304+
. Fixed bug #60887 (SoapClient ignores user_agent option and sends no
305+
User-Agent header). (carloschilazo at gmail dot com)
306+
. Fixed bug #60842, #51775 (Chunked response parsing error when
307+
chunksize length line is > 10 bytes). (Ilia)
308+
. Fixed bug #49853 (Soap Client stream context header option ignored).
309+
(Dmitry)
310+
275311
- SPL:
276312
. Fixed bug #61453 (SplObjectStorage does not identify objects correctly).
277313
(Gustavo)
@@ -728,6 +764,65 @@ PHP NEWS
728764
. Fixed bug #55544 (ob_gzhandler always conflicts with zlib.output_compression).
729765
(Mike)
730766

767+
14 Jun 2012, PHP 5.3.14
768+
769+
- CLI SAPI:
770+
. Fixed bug #61546 (functions related to current script failed when chdir()
771+
in cli sapi). (Laruence, [email protected])
772+
773+
- CURL:
774+
. Fixed bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction).
775+
(Laruence)
776+
777+
- COM:
778+
. Fixed bug #62146 com_dotnet cannot be built shared. (Johannes)
779+
780+
- Core:
781+
. Fixed CVE-2012-2143. (Solar Designer)
782+
. Fixed missing bound check in iptcparse(). (chris at chiappa.net)
783+
. Fixed bug #62373 (serialize() generates wrong reference to the object).
784+
(Moriyoshi)
785+
. Fixed bug #62005 (unexpected behavior when incrementally assigning to a
786+
member of a null object). (Laruence)
787+
. Fixed bug #61991 (long overflow in realpath_cache_get()). (Anatoliy)
788+
. Fixed bug #61764 ('I' unpacks n as signed if n > 2^31-1 on LP64). (Gustavo)
789+
. Fixed bug #61730 (Segfault from array_walk modifying an array passed by
790+
reference). (Laruence)
791+
. Fixed bug #61713 (Logic error in charset detection for htmlentities).
792+
(Anatoliy)
793+
. Fixed bug #54197 ([PATH=] sections incompatibility with user_ini.filename
794+
set to null). (Anatoliy)
795+
. Changed php://fd to be available only for CLI.
796+
797+
- Fileinfo:
798+
. Fixed bug #61812 (Uninitialised value used in libmagic).
799+
(Laruence, Gustavo)
800+
801+
- Iconv extension:
802+
. Fixed a bug that iconv extension fails to link to the correct library
803+
when another extension makes use of a library that links to the iconv
804+
library. See https://bugs.gentoo.org/show_bug.cgi?id=364139 for detail.
805+
(Moriyoshi)
806+
807+
- Intl:
808+
. Fixed bug #62082 (Memory corruption in internal function
809+
get_icu_disp_value_src_php()). (Gustavo)
810+
811+
- JSON
812+
. Fixed bug #61537 (json_encode() incorrectly truncates/discards
813+
information). (Adam)
814+
815+
- PDO:
816+
. Fixed bug #61755 (A parsing bug in the prepared statements can lead to
817+
access violations). (Johannes)
818+
819+
- Phar:
820+
. Fix bug #61065 (Secunia SA44335). (Rasmus)
821+
822+
- Streams:
823+
. Fixed bug #61961 (file_get_contents leaks when access empty file with
824+
maxlen set). (Reeze)
825+
731826
08 May 2012, PHP 5.3.13
732827
- CGI
733828
. Improve fix for PHP-CGI query string parameter vulnerability, CVE-2012-2311.

UPGRADING

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,10 @@ PHP 5.4 UPGRADE NOTES
343343

344344
- Since 5.4.5, resourcebundle_create() accepts null for the first two arguments.
345345

346+
- Since 5.4.6, SimpleXMLElement::getDocNamespaces() has and extra parameter which
347+
allows for toggling if the list of namespaces starts from the document root
348+
or from the node you call the method on
349+
346350
==============================
347351
5. Changes to existing classes
348352
==============================

Zend/tests/bug39018.phpt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,17 @@ print "\nDone\n";
6262

6363
?>
6464
--EXPECTF--
65-
Notice: String offset cast occured in %s on line %d
65+
Notice: String offset cast occurred in %s on line %d
6666

6767
Notice: Uninitialized string offset: 0 in %s on line %d
6868

6969
Notice: Uninitialized string offset: 0 in %s on line %d
7070

71-
Notice: String offset cast occured in %s on line %d
71+
Notice: String offset cast occurred in %s on line %d
7272

7373
Notice: Uninitialized string offset: %i in %s on line %d
7474

75-
Notice: String offset cast occured in %s on line %d
75+
Notice: String offset cast occurred in %s on line %d
7676

7777
Notice: Uninitialized string offset: %i in %s on line %d
7878

@@ -88,16 +88,16 @@ Notice: Uninitialized string offset: 4 in %s on line %d
8888

8989
Notice: Uninitialized string offset: 4 in %s on line %d
9090

91-
Notice: String offset cast occured in %s on line %d
91+
Notice: String offset cast occurred in %s on line %d
9292

9393
Notice: Uninitialized string offset: 12 in %s on line %d
9494

95-
Notice: String offset cast occured in %s on line %d
95+
Notice: String offset cast occurred in %s on line %d
9696

9797
Notice: Uninitialized string offset: 12 in %s on line %d
9898

99-
Notice: String offset cast occured in %s on line %d
99+
Notice: String offset cast occurred in %s on line %d
100100

101-
Notice: String offset cast occured in %s on line %d
101+
Notice: String offset cast occurred in %s on line %d
102102
b
103103
Done

Zend/tests/offset_string.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ echo "Done\n";
3030
--EXPECTF--
3131
string(1) "i"
3232

33-
Notice: String offset cast occured in %s on line %d
33+
Notice: String offset cast occurred in %s on line %d
3434
string(1) "S"
3535

36-
Notice: String offset cast occured in %s on line %d
36+
Notice: String offset cast occurred in %s on line %d
3737
string(1) "S"
3838

3939
Warning: Illegal string offset 'run away' in %s on line %d
@@ -46,10 +46,10 @@ string(1) "o"
4646
Notice: A non well formed numeric value encountered in %s on line %d
4747
string(1) "r"
4848

49-
Notice: String offset cast occured in %s on line %d
49+
Notice: String offset cast occurred in %s on line %d
5050
string(1) "i"
5151

52-
Notice: String offset cast occured in %s on line %d
52+
Notice: String offset cast occurred in %s on line %d
5353
string(1) "S"
5454

5555
Warning: Illegal offset type in %s on line %d

Zend/zend_compile.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3712,7 +3712,7 @@ static int zend_traits_merge_functions(zend_function *fn TSRMLS_DC, int num_args
37123712
} else {
37133713
/* Add it to result function table */
37143714
if (zend_hash_quick_add(resulting_table, hash_key->arKey, hash_key->nKeyLength, hash_key->h, fn, sizeof(zend_function), NULL)==FAILURE) {
3715-
zend_error(E_COMPILE_ERROR, "Trait method %s has not been applied, because failure occured during updating resulting trait method table", fn->common.function_name);
3715+
zend_error(E_COMPILE_ERROR, "Trait method %s has not been applied, because failure occurred during updating resulting trait method table", fn->common.function_name);
37163716
}
37173717
}
37183718

@@ -3829,7 +3829,7 @@ static int zend_traits_merge_functions_to_class(zend_function *fn TSRMLS_DC, int
38293829
function_add_ref(&fn_copy);
38303830

38313831
if (zend_hash_quick_update(&ce->function_table, hash_key->arKey, hash_key->nKeyLength, hash_key->h, &fn_copy, sizeof(zend_function), (void**)&fn_copy_p)==FAILURE) {
3832-
zend_error(E_COMPILE_ERROR, "Trait method %s has not been applied, because failure occured during updating class method table", hash_key->arKey);
3832+
zend_error(E_COMPILE_ERROR, "Trait method %s has not been applied, because failure occurred during updating class method table", hash_key->arKey);
38333833
}
38343834

38353835
zend_add_magic_methods(ce, hash_key->arKey, hash_key->nKeyLength, fn_copy_p TSRMLS_CC);

Zend/zend_execute.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,7 +1161,7 @@ static void zend_fetch_dimension_address(temp_variable *result, zval **container
11611161
case IS_DOUBLE:
11621162
case IS_NULL:
11631163
case IS_BOOL:
1164-
zend_error(E_NOTICE, "String offset cast occured");
1164+
zend_error(E_NOTICE, "String offset cast occurred");
11651165
break;
11661166
default:
11671167
zend_error(E_WARNING, "Illegal offset type");
@@ -1284,7 +1284,7 @@ static void zend_fetch_dimension_address_read(temp_variable *result, zval **cont
12841284
case IS_NULL:
12851285
case IS_BOOL:
12861286
if (type != BP_VAR_IS) {
1287-
zend_error(E_NOTICE, "String offset cast occured");
1287+
zend_error(E_NOTICE, "String offset cast occurred");
12881288
}
12891289
break;
12901290
default:

Zend/zend_hash.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ END_EXTERN_C()
330330
if (idx-1 > LONG_MAX) { /* overflow */ \
331331
break; \
332332
} \
333-
idx = (ulong)(-(long)idx); \
333+
idx = 0 - idx; \
334334
} else if (idx > LONG_MAX) { /* overflow */ \
335335
break; \
336336
} \

ext/curl/interface.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2177,7 +2177,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
21772177

21782178
convert_to_string_ex(zvalue);
21792179

2180-
if (!Z_STRLEN_PP(zvalue) || php_check_open_basedir(Z_STRVAL_PP(zvalue) TSRMLS_CC)) {
2180+
if (Z_STRLEN_PP(zvalue) && php_check_open_basedir(Z_STRVAL_PP(zvalue) TSRMLS_CC)) {
21812181
RETVAL_FALSE;
21822182
return 1;
21832183
}

ext/curl/tests/bug61948.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ open_basedir="/tmp"
1616
curl_close($ch);
1717
?>
1818
--EXPECTF--
19-
bool(false)
19+
bool(true)
2020
bool(true)
2121

2222
Warning: curl_setopt(): open_basedir restriction in effect. File(/xxx/bar) is not within the allowed path(s): (/tmp) in %sbug61948.php on line %d

0 commit comments

Comments
 (0)