Skip to content

Commit ca8ecab

Browse files
committed
Merge branch 'master' into assert
* master: Update NEWS Fixed bug #69139 (Crash in gc_zval_possible_root on unserialize) windows only test Align entries format Align entries format for 5.6.7 Align entries format for 5.5.23 Bump header year Fixed bug #69144 (strtr not replacing with partly matching replace pairs) Fixed test? Revert mktime()/gmmktime()'s arginfo Update NEWS Fixed bug #69141 Missing arguments in reflection info for some builtin functions Add NEWS entry Remove useless date warning Fix ARG_INFO for levenshtein Fix ARG_INFO for levenshtein fix dir separator in tests Update NEWS Fixed bug #69085 (SoapClient's __call() type confusion through unserialize()).
2 parents 24328ac + 9dac923 commit ca8ecab

16 files changed

+76
-36
lines changed

NEWS

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
. Fixed day_of_week function as it could sometimes return negative values
5757
internally. (Derick)
5858
. Removed $is_dst parameter from mktime() and gmmktime(). (Nikita)
59+
. Removed date.timezone warning (https://wiki.php.net/rfc/date.timezone_warning_removal). (Bob)
5960

6061
- DBA:
6162
. Fixed bug #62490 (dba_delete returns true on missing item (inifile)). (Mike)
@@ -74,7 +75,7 @@
7475
. New FILTER_VALIDATE_DOMAIN and better RFC conformance for FILTER_VALIDATE_URL. (Kevin Dunglas)
7576

7677
- FPM:
77-
. Fixed bug #68945 (Unknown admin values segfault pools) (Laruence)
78+
. Fixed bug #68945 (Unknown admin values segfault pools). (Laruence)
7879
. Fixed bug #65933 (Cannot specify config lines longer than 1024 bytes). (Chris Wright)
7980
. Implement request #67106 (Split main fpm config). (Elan Ruusamäe, Remi)
8081

@@ -97,8 +98,8 @@
9798
+ Opcache). (Laruence)
9899

99100
- OpenSSL:
100-
. Fixed bug #61285, #68329, #68046, #41631: encrypted streams don't observe
101-
socket timeouts (Brad Broerman)
101+
. Fixed bug #61285, #68329, #68046, #41631 (encrypted streams don't observe
102+
socket timeouts). (Brad Broerman)
102103

103104
- pcntl:
104105
. Fixed bug #60509 (pcntl_signal doesn't decrease ref-count of old handler
@@ -120,11 +121,10 @@
120121

121122
- Session:
122123
. Fixed bug #67694 (Regression in session_regenerate_id()). (Tjerk)
123-
. Fixed bug #68941 (mod_files.sh is a bash-script) (bugzilla at ii.nl, Yasuo)
124+
. Fixed bug #68941 (mod_files.sh is a bash-script). (bugzilla at ii.nl, Yasuo)
124125

125126
- SOAP:
126-
. Fixed bug #68361 (Segmentation fault on SoapClient::__getTypes).
127-
(Laruence)
127+
. Fixed bug #68361 (Segmentation fault on SoapClient::__getTypes). (Laruence)
128128

129129
- SPL:
130130
. Implemented #67886 (SplPriorityQueue/SplHeap doesn't expose extractFlags

ext/date/php_date.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -827,13 +827,6 @@ PHP_RSHUTDOWN_FUNCTION(date)
827827
*/
828828
#define DATE_FORMAT_COOKIE "l, d-M-Y H:i:s T"
829829

830-
#define DATE_TZ_ERRMSG \
831-
"It is not safe to rely on the system's timezone settings. You are " \
832-
"*required* to use the date.timezone setting or the " \
833-
"date_default_timezone_set() function. In case you used any of those " \
834-
"methods and you are still getting this warning, you most likely " \
835-
"misspelled the timezone identifier. "
836-
837830
#define SUNFUNCS_RET_TIMESTAMP 0
838831
#define SUNFUNCS_RET_STRING 1
839832
#define SUNFUNCS_RET_DOUBLE 2
@@ -954,7 +947,9 @@ static PHP_INI_MH(OnUpdate_date_timezone)
954947
DATEG(timezone_valid) = 0;
955948
if (stage == PHP_INI_STAGE_RUNTIME) {
956949
if (!timelib_timezone_id_is_valid(DATEG(default_timezone), DATE_TIMEZONEDB)) {
957-
php_error_docref(NULL, E_WARNING, DATE_TZ_ERRMSG);
950+
if (DATEG(default_timezone) && *DATEG(default_timezone)) {
951+
php_error_docref(NULL, E_WARNING, "Invalid date.timezone value '%s', we selected the timezone 'UTC' for now.", DATEG(default_timezone));
952+
}
958953
} else {
959954
DATEG(timezone_valid) = 1;
960955
}
@@ -994,7 +989,6 @@ static char* guess_timezone(const timelib_tzdb *tzdb)
994989
return DATEG(default_timezone);
995990
}
996991
/* Fallback to UTC */
997-
php_error_docref(NULL, E_WARNING, DATE_TZ_ERRMSG "We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.");
998992
return "UTC";
999993
}
1000994

ext/date/tests/bug68942.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ $data = unserialize('a:2:{i:0;O:12:"DateTimeZone":2:{s:13:"timezone_type";a:2:{i
66
var_dump($data);
77
?>
88
--EXPECTF--
9-
Fatal error: DateTimeZone::__wakeup(): Timezone initialization failed in %s/bug68942.php on line %d
9+
Fatal error: DateTimeZone::__wakeup(): Timezone initialization failed in %s%ebug68942.php on line %d

ext/date/tests/bug68942_2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ $data = unserialize('a:2:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2000-01-01 00:0
66
var_dump($data);
77
?>
88
--EXPECTF--
9-
Fatal error: Invalid serialization data for DateTime object in %s/bug68942_2.php on line %d
9+
Fatal error: Invalid serialization data for DateTime object in %s%ebug68942_2.php on line %d

ext/date/tests/date_default_timezone_get-1.phpt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ date.timezone=
1212
echo date_default_timezone_get(), "\n";
1313
echo date('e'), "\n";
1414
?>
15-
--EXPECTF--
16-
Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in %sdate_default_timezone_get-1.php on line 3
15+
--EXPECT--
1716
UTC
18-
19-
Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in %sdate_default_timezone_get-1.php on line 4
2017
UTC

ext/date/tests/date_default_timezone_get-2.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@ date.timezone=
1212
echo date_default_timezone_get(), "\n";
1313
?>
1414
--EXPECTF--
15-
Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in %sdate_default_timezone_get-2.php on line 3
1615
UTC

ext/date/tests/date_default_timezone_set-1.phpt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ date.timezone=
2121
echo date(DATE_ISO8601, $date3), "\n";
2222
echo date(DATE_ISO8601, $date4), "\n";
2323
?>
24-
--EXPECTF--
25-
Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in %sdate_default_timezone_set-1.php on line 3
26-
27-
Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in %sdate_default_timezone_set-1.php on line 4
24+
--EXPECT--
2825
America/Indiana/Knox
2926
2005-01-12T03:00:00-0500
3027
2005-07-12T03:00:00-0500

ext/soap/soap.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2581,7 +2581,7 @@ static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *act
25812581
}
25822582

25832583
if ((trace = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "trace", sizeof("trace")-1)) != NULL &&
2584-
Z_LVAL_P(trace) > 0) {
2584+
Z_TYPE_P(trace) == IS_LONG && Z_LVAL_P(trace) > 0) {
25852585
add_property_stringl(this_ptr, "__last_request", buf, buf_size);
25862586
}
25872587

@@ -2609,7 +2609,7 @@ static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *act
26092609
}
26102610
ret = FALSE;
26112611
} else if ((trace = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "trace", sizeof("trace")-1)) != NULL &&
2612-
Z_LVAL_P(trace) > 0) {
2612+
Z_TYPE_P(trace) == IS_LONG && Z_LVAL_P(trace) > 0) {
26132613
add_property_str(this_ptr, "__last_response", zend_string_copy(Z_STR_P(response)));
26142614
}
26152615
zval_ptr_dtor(&func);
@@ -2909,7 +2909,7 @@ PHP_METHOD(SoapClient, __call)
29092909

29102910
/* Add default headers */
29112911
this_ptr = getThis();
2912-
if ((tmp = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "__default_headers", sizeof("__default_headers")-1)) != NULL) {
2912+
if ((tmp = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "__default_headers", sizeof("__default_headers")-1)) != NULL && Z_TYPE_P(tmp) == IS_ARRAY) {
29132913
HashTable *default_headers = Z_ARRVAL_P(tmp);
29142914
if (soap_headers) {
29152915
if (!free_soap_headers) {

ext/soap/tests/bugs/bug69085.phpt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
--TEST--
2+
Bug #69085 (SoapClient's __call() type confusion through unserialize())
3+
--SKIPIF--
4+
<?php require_once('skipif.inc'); ?>
5+
--INI--
6+
soap.wsdl_cache_enabled=0
7+
--FILE--
8+
<?php
9+
10+
$dummy = unserialize('O:10:"SoapClient":5:{s:3:"uri";s:1:"a";s:8:"location";s:22:"http://localhost/a.xml";s:17:"__default_headers";i:1337;s:15:"__last_response";s:1:"a";s:5:"trace";s:1:"x";}');
11+
try {
12+
$dummy->whatever();
13+
} catch (Exception $e) {
14+
echo "okey";
15+
}
16+
--EXPECT--
17+
okey

ext/standard/basic_functions.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1419,6 +1419,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_setcookie, 0, 0, 1)
14191419
ZEND_ARG_INFO(0, path)
14201420
ZEND_ARG_INFO(0, domain)
14211421
ZEND_ARG_INFO(0, secure)
1422+
ZEND_ARG_INFO(0, httponly)
14221423
ZEND_END_ARG_INFO()
14231424

14241425
ZEND_BEGIN_ARG_INFO_EX(arginfo_setrawcookie, 0, 0, 1)
@@ -1428,6 +1429,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_setrawcookie, 0, 0, 1)
14281429
ZEND_ARG_INFO(0, path)
14291430
ZEND_ARG_INFO(0, domain)
14301431
ZEND_ARG_INFO(0, secure)
1432+
ZEND_ARG_INFO(0, httponly)
14311433
ZEND_END_ARG_INFO()
14321434

14331435
ZEND_BEGIN_ARG_INFO_EX(arginfo_headers_sent, 0, 0, 0)
@@ -1533,12 +1535,14 @@ ZEND_BEGIN_ARG_INFO(arginfo_iptcparse, 0)
15331535
ZEND_ARG_INFO(0, iptcdata)
15341536
ZEND_END_ARG_INFO()
15351537
/* }}} */
1538+
15361539
/* {{{ lcg.c */
15371540
ZEND_BEGIN_ARG_INFO(arginfo_lcg_value, 0)
15381541
ZEND_END_ARG_INFO()
15391542
/* }}} */
1543+
15401544
/* {{{ levenshtein.c */
1541-
ZEND_BEGIN_ARG_INFO(arginfo_levenshtein, 0)
1545+
ZEND_BEGIN_ARG_INFO_EX(arginfo_levenshtein, 0, 0, 2)
15421546
ZEND_ARG_INFO(0, str1)
15431547
ZEND_ARG_INFO(0, str2)
15441548
ZEND_ARG_INFO(0, cost_ins)

0 commit comments

Comments
 (0)