Skip to content

Commit ef0eed7

Browse files
author
George Wang
committed
Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5
2 parents 0cc2600 + d67c05b commit ef0eed7

35 files changed

+1380
-735
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
*.tgz
2020
*.tar.gz
2121
*.tar.bz2
22+
*.tar.xz
2223
.FBCIndex
2324
.FBCLockFolder
2425
.deps

EXTENSIONS

+6
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,12 @@ MAINTENANCE: Maintained
385385
STATUS: Working
386386
SINCE: 4.0.4
387387
-------------------------------------------------------------------------------
388+
EXTENSION: hash
389+
PRIMARY MAINTAINER: Sara Golemon <pollita@php.net>, Mike Wallner <mike@php.net>, Anatol Belski <ab@php.net>
390+
MAINTENANCE: Maintained
391+
STATUS: Working
392+
SINCE: 5.1.2
393+
-------------------------------------------------------------------------------
388394
EXTENSION: iconv
389395
PRIMARY MAINTAINER: Moriyoshi Koizumi <moriyoshi@php.net>
390396
MAINTENANCE: Maintained

NEWS

+26-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,35 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3+
?? ??? 2014, PHP 5.5.19
4+
5+
- Core:
6+
. Fixed bug #68118 ($a->foo .= 'test'; can leave $a->foo undefined). (Nikita)
7+
8+
39
?? ??? 2014, PHP 5.5.18
410

11+
- Core:
12+
. Fixed bug #67985 (Incorrect last used array index copied to new array after
13+
unset). (Tjerk)
14+
. Fixed bug #67739 (Windows 8.1/Server 2012 R2 OS build number reported
15+
as 6.2 (instead of 6.3)). (Christian Wenz)
16+
. Fixed bug #67633 (A foreach on an array returned from a function not doing
17+
copy-on-write). (Nikita)
18+
. Fixed bug #51800 (proc_open on Windows hangs forever). (Anatol)
19+
20+
- FPM:
21+
. Fixed bug #65641 (PHP-FPM incorrectly defines the SCRIPT_NAME variable
22+
when using Apache, mod_proxy-fcgi and ProxyPass). (Remi)
23+
. Implemented FR #55508 (listen and listen.allowed_clients should take IPv6
24+
addresses). (Robin Gloster)
25+
26+
- Reflection:
27+
. Fixed bug #68103 (Duplicate entry in Reflection for class alias). (Remi)
28+
529
- Session:
630
. Fixed bug #67972 (SessionHandler Invalid memory read create_sid()). (Adam)
731

8-
11 Sep 2014, PHP 5.5.17
32+
18 Sep 2014, PHP 5.5.17
933

1034
- Core:
1135
. Fixed bug #47358 (glob returns error, should be empty array()). (Pierre)
@@ -18,8 +42,7 @@ PHP NEWS
1842
(Aidas Kasparas)
1943

2044
- FPM:
21-
. Fixed #65641 (PHP-FPM incorrectly defines the SCRIPT_NAME variable when
22-
using Apache). (David Zuelke)
45+
. Fixed #67606 (FPM with mod_fastcgi/apache2.4 is broken). (David Zuelke)
2346

2447
- OpenSSL:
2548
. Fixed bug #41631 (socket timeouts not honored in blocking SSL reads).

Zend/tests/bug67633.phpt

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
--TEST--
2+
Bug #67633: A foreach on an array returned from a function not doing copy-on-write
3+
--FILE--
4+
<?php
5+
6+
function id($x) {
7+
return $x;
8+
}
9+
10+
function &ref_id(&$x) {
11+
return $x;
12+
}
13+
14+
$c = 'c';
15+
$array = ['a', 'b', $c];
16+
17+
foreach(id($array) as &$v) {
18+
$v .= 'q';
19+
}
20+
var_dump($array);
21+
22+
foreach(ref_id($array) as &$v) {
23+
$v .= 'q';
24+
}
25+
var_dump($array);
26+
27+
?>
28+
--EXPECT--
29+
array(3) {
30+
[0]=>
31+
string(1) "a"
32+
[1]=>
33+
string(1) "b"
34+
[2]=>
35+
string(1) "c"
36+
}
37+
array(3) {
38+
[0]=>
39+
string(2) "aq"
40+
[1]=>
41+
string(2) "bq"
42+
[2]=>
43+
&string(2) "cq"
44+
}

Zend/tests/bug67985.phpt

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--TEST--
2+
Bug #67985 - Last used array index not copied to new array at assignment
3+
--FILE--
4+
<?php
5+
6+
$a = ['zero', 'one', 'two'];
7+
unset($a[2]);
8+
$b = $a;
9+
$a[] = 'three';
10+
$b[] = 'three';
11+
12+
var_dump($a === $b);
13+
14+
?>
15+
--EXPECT--
16+
bool(true)

Zend/tests/bug68118.phpt

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
--TEST--
2+
Bug #68118: $a->foo .= 'test'; can leave $a->foo undefined
3+
--FILE--
4+
<?php
5+
6+
set_error_handler(function() {
7+
$obj = new stdClass;
8+
$obj->test = 'meow';
9+
return true;
10+
});
11+
12+
$a = new stdClass;
13+
$a->undefined .= 'test';
14+
var_dump($a);
15+
16+
?>
17+
--EXPECT--
18+
object(stdClass)#2 (1) {
19+
["undefined"]=>
20+
string(4) "test"
21+
}

Zend/zend_compile.c

+9
Original file line numberDiff line numberDiff line change
@@ -6231,6 +6231,15 @@ void zend_do_foreach_begin(znode *foreach_token, znode *open_brackets_token, zno
62316231
/* save the location of FETCH_W instruction(s) */
62326232
open_brackets_token->u.op.opline_num = get_next_op_number(CG(active_op_array));
62336233
zend_do_end_variable_parse(array, BP_VAR_W, 0 TSRMLS_CC);
6234+
6235+
if (zend_is_function_or_method_call(array)) {
6236+
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
6237+
opline->opcode = ZEND_SEPARATE;
6238+
SET_NODE(opline->op1, array);
6239+
SET_UNUSED(opline->op2);
6240+
opline->result_type = IS_VAR;
6241+
opline->result.var = opline->op1.var;
6242+
}
62346243
} else {
62356244
is_variable = 0;
62366245
open_brackets_token->u.op.opline_num = get_next_op_number(CG(active_op_array));

Zend/zend_object_handlers.c

+6-3
Original file line numberDiff line numberDiff line change
@@ -754,9 +754,6 @@ static zval **zend_std_get_property_ptr_ptr(zval *object, zval *member, int type
754754
/* we don't have access controls - will just add it */
755755
new_zval = &EG(uninitialized_zval);
756756

757-
if(UNEXPECTED(type == BP_VAR_RW || type == BP_VAR_R)) {
758-
zend_error(E_NOTICE, "Undefined property: %s::$%s", zobj->ce->name, Z_STRVAL_P(member));
759-
}
760757
Z_ADDREF_P(new_zval);
761758
if (EXPECTED((property_info->flags & ZEND_ACC_STATIC) == 0) &&
762759
property_info->offset >= 0) {
@@ -776,6 +773,12 @@ static zval **zend_std_get_property_ptr_ptr(zval *object, zval *member, int type
776773
}
777774
zend_hash_quick_update(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, &new_zval, sizeof(zval *), (void **) &retval);
778775
}
776+
777+
/* Notice is thrown after creation of the property, to avoid EG(std_property_info)
778+
* being overwritten in an error handler. */
779+
if (UNEXPECTED(type == BP_VAR_RW || type == BP_VAR_R)) {
780+
zend_error(E_NOTICE, "Undefined property: %s::$%s", zobj->ce->name, Z_STRVAL_P(member));
781+
}
779782
} else {
780783
/* we do have getter - fail and let it try again with usual get/set */
781784
retval = NULL;

Zend/zend_variables.c

+1
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC)
136136
ALLOC_HASHTABLE_REL(tmp_ht);
137137
zend_hash_init(tmp_ht, zend_hash_num_elements(original_ht), NULL, ZVAL_PTR_DTOR, 0);
138138
zend_hash_copy(tmp_ht, original_ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
139+
tmp_ht->nNextFreeElement = original_ht->nNextFreeElement;
139140
zvalue->value.ht = tmp_ht;
140141
}
141142
break;

configure.in

+23-9
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=5
122-
PHP_RELEASE_VERSION=18
122+
PHP_RELEASE_VERSION=19
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`
@@ -784,7 +784,12 @@ if test "$PHP_GCOV" = "yes"; then
784784
AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
785785
fi
786786

787-
ltp_version_list="1.5 1.6 1.7 1.9 1.10"
787+
dnl min: 1.5 (i.e. 105, major * 100 + minor for easier comparison)
788+
ltp_version_min="105"
789+
dnl non-working versions, e.g. "1.8 1.18";
790+
dnl remove "none" when introducing the first incompatible LTP version an
791+
dnl separate any following additions by spaces
792+
ltp_version_exclude="1.8"
788793

789794
AC_CHECK_PROG(LTP, lcov, lcov)
790795
AC_CHECK_PROG(LTP_GENHTML, genhtml, genhtml)
@@ -794,21 +799,30 @@ if test "$PHP_GCOV" = "yes"; then
794799
if test "$LTP"; then
795800
AC_CACHE_CHECK([for ltp version], php_cv_ltp_version, [
796801
php_cv_ltp_version=invalid
797-
ltp_version=`$LTP -v 2>/dev/null | $SED -e 's/^.* //'`
798-
for ltp_check_version in $ltp_version_list; do
799-
if test "$ltp_version" = "$ltp_check_version"; then
800-
php_cv_ltp_version="$ltp_check_version (ok)"
802+
ltp_version_vars=`$LTP -v 2>/dev/null | $SED -e 's/^.* //' -e 's/\./ /g' | tr -d a-z`
803+
if test -n "$ltp_version_vars"; then
804+
set $ltp_version_vars
805+
ltp_version="${1}.${2}"
806+
ltp_version_num="`expr ${1} \* 100 + ${2}`"
807+
if test $ltp_version_num -ge $ltp_version_min; then
808+
php_cv_ltp_version="$ltp_version (ok)"
809+
for ltp_check_version in $ltp_version_exclude; do
810+
if test "$ltp_version" = "$ltp_check_version"; then
811+
php_cv_ltp_version=invalid
812+
break
813+
fi
814+
done
801815
fi
802-
done
816+
fi
803817
])
804818
else
805-
ltp_msg="To enable code coverage reporting you must have one of the following LTP versions installed: $ltp_version_list"
819+
ltp_msg="To enable code coverage reporting you must have LTP installed"
806820
AC_MSG_ERROR([$ltp_msg])
807821
fi
808822

809823
case $php_cv_ltp_version in
810824
""|invalid[)]
811-
ltp_msg="You must have one of the following versions of LTP: $ltp_version_list (found: $ltp_version)."
825+
ltp_msg="This LTP version is not supported (found: $ltp_version, min: $ltp_version_min, excluded: $ltp_version_exclude)."
812826
AC_MSG_ERROR([$ltp_msg])
813827
LTP="exit 0;"
814828
;;

ext/curl/tests/check_win_config.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Features
2828
AsynchDNS => Yes
2929
CharConv => No
3030
Debug => No
31-
GSS-Negotiate => Yes
31+
GSS-Negotiate => No
3232
IDN => Yes
3333
IPv6 => Yes
3434
krb4 => No

0 commit comments

Comments
 (0)