mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-09 10:10:50 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b34dc2d52 | ||
|
|
01990286f6 | ||
|
|
056cb8c256 | ||
|
|
fff1cab367 | ||
|
|
65bf0364b6 | ||
|
|
c4ae856912 | ||
|
|
11b4f105bf | ||
|
|
08293a960b | ||
|
|
459c382df5 | ||
|
|
26f217bf40 | ||
|
|
464c1639ae | ||
|
|
649494c0ee | ||
|
|
78b10dd9d6 | ||
|
|
0954ea8d6d | ||
|
|
f38487a0e0 | ||
|
|
ef09bc0645 | ||
|
|
d3e3bc611a | ||
|
|
e347b2ded6 | ||
|
|
02e9e59beb | ||
|
|
6e3d24bcf4 | ||
|
|
b73a73da25 | ||
|
|
71f8c4dcfd | ||
|
|
c667bb94fa | ||
|
|
8a1713e39c | ||
|
|
9f49ebb5ba | ||
|
|
7d418430fd | ||
|
|
d74fbfb38f | ||
|
|
7f051ac583 | ||
|
|
e04b91e6e2 | ||
|
|
89dd7fb328 | ||
|
|
8ec91086ee | ||
|
|
b067bda4cd | ||
|
|
777929b1ae | ||
|
|
42e5df141c | ||
|
|
ae3f975c5d | ||
|
|
2e5a747b59 | ||
|
|
c1d5718697 | ||
|
|
8cbfc882d2 | ||
|
|
cfe577fb86 | ||
|
|
90bd4be3f9 | ||
|
|
b8e0351978 | ||
|
|
05c90e5994 | ||
|
|
1b22e9dc2e | ||
|
|
d40a852919 | ||
|
|
15dbe775d1 | ||
|
|
99549ce79c | ||
|
|
b39c70b4a7 | ||
|
|
72073228ca | ||
|
|
1a06fae543 | ||
|
|
83033f0b32 | ||
|
|
bdd66e1492 | ||
|
|
ca870dfee7 | ||
|
|
abad134681 | ||
|
|
2d30bc96a1 | ||
|
|
b966a8b5fa | ||
|
|
62c1edf535 | ||
|
|
2c070847e7 | ||
|
|
87d56a3d07 | ||
|
|
5dafb523fd | ||
|
|
6658b437ae | ||
|
|
5c957b502e | ||
|
|
378f785515 | ||
|
|
561f1afe6e | ||
|
|
4b3a11b329 | ||
|
|
476b7f1667 | ||
|
|
622dc2a611 | ||
|
|
64adba3b3f | ||
|
|
c0c0871911 | ||
|
|
7431d6dda6 | ||
|
|
f97607027a | ||
|
|
36c53036e7 | ||
|
|
3d9563b8b2 | ||
|
|
20a608d9da | ||
|
|
6bd30e8f1a | ||
|
|
4c0e50c88a | ||
|
|
2735318c7b | ||
|
|
f50df1d0e3 | ||
|
|
023cbdb2ca | ||
|
|
a581e64199 | ||
|
|
e3f411c9f7 | ||
|
|
1967950dc3 | ||
|
|
9622a3be43 | ||
|
|
d9dfac90bf | ||
|
|
6028fe511e | ||
|
|
9891b9ede2 | ||
|
|
c436fe2426 | ||
|
|
a0b9554f94 | ||
|
|
d83d5f4198 | ||
|
|
7b392c7154 | ||
|
|
e7166ea9be | ||
|
|
9a07e9e1f8 | ||
|
|
38a65d5ef9 | ||
|
|
e67096dbbb | ||
|
|
392bcba58d | ||
|
|
09ef61e3ca | ||
|
|
bf3e2dce7b | ||
|
|
66dbeb81ba | ||
|
|
36301bd615 | ||
|
|
a1e74a9e0e | ||
|
|
c0203c0ceb | ||
|
|
3f6d9fe9cc | ||
|
|
f639b64dca | ||
|
|
7962185ded | ||
|
|
8cfaea656c | ||
|
|
91a0d48675 |
No files matched your search
+2
-2
@@ -24,7 +24,7 @@ environment:
|
||||
PHP_BUILD_CACHE_BASE_DIR: c:\build-cache
|
||||
PHP_BUILD_OBJ_DIR: c:\obj
|
||||
PHP_BUILD_CACHE_SDK_DIR: c:\build-cache\sdk
|
||||
PHP_BUILD_SDK_BRANCH: php-sdk-2.0.1
|
||||
PHP_BUILD_SDK_BRANCH: php-sdk-2.0.4
|
||||
# ext and env setup for tests
|
||||
#MYSQL_TEST_PASSWD: Password12!
|
||||
#MYSQL_TEST_USER: root
|
||||
@@ -43,7 +43,7 @@ environment:
|
||||
services:
|
||||
# the setup scripts have to be touched, once some other db version is used
|
||||
- mysql
|
||||
- postgresql95
|
||||
- postgresql96
|
||||
|
||||
platform:
|
||||
- x64
|
||||
|
||||
@@ -1,5 +1,39 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
7 Jun 2017, PHP 7.1.6
|
||||
|
||||
- Core:
|
||||
. Fixed bug #74600 (crash (SIGSEGV) in _zend_hash_add_or_update_i).
|
||||
(Laruence)
|
||||
. Fixed bug #74546 (SIGILL in ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_CONST).
|
||||
(Laruence)
|
||||
. Fixed bug #74589 (__DIR__ wrong for unicode character). (Anatol)
|
||||
|
||||
- intl:
|
||||
. Fixed bug #74468 (wrong reflection on Collator::sortWithSortKeys). (villfa)
|
||||
|
||||
- MySQLi:
|
||||
. Fixed bug #74547 (mysqli::change_user() doesn't accept null as $database
|
||||
argument w/strict_types). (Anatol)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #74596 (SIGSEGV with opcache.revalidate_path enabled). (Laruence)
|
||||
|
||||
- phar:
|
||||
. Fixed bug #51918 (Phar::webPhar() does not handle requests sent through PUT
|
||||
and DELETE method). (Christian Weiske)
|
||||
|
||||
- Readline:
|
||||
. Fixed bug #74490 (readline() moves the cursor to the beginning of the line).
|
||||
(Anatol)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #74510 (win32/sendmail.c anchors CC header but not BCC).
|
||||
(Damian Wadley, Anatol)
|
||||
|
||||
- xmlreader:
|
||||
. Fixed bug #74457 (Wrong reflection on XMLReader::expand). (villfa)
|
||||
|
||||
11 May 2017, PHP 7.1.5
|
||||
|
||||
- Core:
|
||||
@@ -15,6 +49,7 @@ PHP NEWS
|
||||
(Matt Ficken)
|
||||
. Fixed bug #74337 (php-cgi.exe crash on facebook callback).
|
||||
(Anton Serbulov)
|
||||
. Patch for bug #74216 was reverted. (Anatol)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #74404 (Wrong reflection on DateTimeZone::getTransitions).
|
||||
@@ -33,6 +68,10 @@ PHP NEWS
|
||||
. Fixed bug #74343 (compile fails on solaris 11 with system gd2 library).
|
||||
(krakjoe)
|
||||
|
||||
- MySQLi:
|
||||
. Fixed bug #74432 (mysqli_connect adding ":3306" to $host if $port parameter
|
||||
not given). (Anatol)
|
||||
|
||||
- MySQLnd:
|
||||
. Fixed bug #74376 (Invalid free of persistent results on error/connection
|
||||
loss). (Yussuf Khalil)
|
||||
@@ -57,6 +96,8 @@ PHP NEWS
|
||||
key). (Jakub Zelenka)
|
||||
. Fixed bug #74341 (openssl_x509_parse fails to parse ASN.1 UTCTime without
|
||||
seconds). (Moritz Fain)
|
||||
. Fixed bug #73808 (iv length warning too restrictive for aes-128-ccm).
|
||||
(Jakub Zelenka)
|
||||
|
||||
- phar:
|
||||
. Fixed bug #74383 (phar method parameters reflection correction).
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--TEST--
|
||||
Bug #74546 (SIGILL in ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_CONST_HANDLER())
|
||||
--FILE--
|
||||
<?php
|
||||
"000000"[0]::d;
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught Error: Class '0' not found in %sbug74546.php:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %sbug74546.php on line %d
|
||||
@@ -0,0 +1,29 @@
|
||||
--TEST--
|
||||
Bug #74606 (Segfault within try/catch/finally nesting in Generators)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function gen() {
|
||||
$array = ["foo"];
|
||||
$array[] = "bar";
|
||||
|
||||
foreach ($array as $item) {
|
||||
try {
|
||||
try {
|
||||
yield;
|
||||
} finally {
|
||||
echo "fin $item\n";
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
echo "catch\n";
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
gen()->throw(new Exception);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
fin foo
|
||||
catch
|
||||
fin bar
|
||||
+14
-4
@@ -6455,7 +6455,11 @@ static zend_bool zend_try_ct_eval_magic_const(zval *zv, zend_ast *ast) /* {{{ */
|
||||
{
|
||||
zend_string *filename = CG(compiled_filename);
|
||||
zend_string *dirname = zend_string_init(ZSTR_VAL(filename), ZSTR_LEN(filename), 0);
|
||||
#ifdef ZEND_WIN32
|
||||
php_win32_ioutil_dirname(ZSTR_VAL(dirname), ZSTR_LEN(dirname));
|
||||
#else
|
||||
zend_dirname(ZSTR_VAL(dirname), ZSTR_LEN(dirname));
|
||||
#endif
|
||||
|
||||
if (strcmp(ZSTR_VAL(dirname), ".") == 0) {
|
||||
dirname = zend_string_extend(dirname, MAXPATHLEN, 0);
|
||||
@@ -7370,8 +7374,11 @@ void zend_compile_class_const(znode *result, zend_ast *ast) /* {{{ */
|
||||
return;
|
||||
}
|
||||
|
||||
zend_eval_const_expr(&class_ast);
|
||||
zend_eval_const_expr(&const_ast);
|
||||
zend_eval_const_expr(&ast->child[0]);
|
||||
zend_eval_const_expr(&ast->child[1]);
|
||||
|
||||
class_ast = ast->child[0];
|
||||
const_ast = ast->child[1];
|
||||
|
||||
if (class_ast->kind == ZEND_AST_ZVAL) {
|
||||
zend_string *resolved_name;
|
||||
@@ -8309,8 +8316,11 @@ void zend_eval_const_expr(zend_ast **ast_ptr) /* {{{ */
|
||||
break;
|
||||
}
|
||||
|
||||
zend_eval_const_expr(&class_ast);
|
||||
zend_eval_const_expr(&name_ast);
|
||||
zend_eval_const_expr(&ast->child[0]);
|
||||
zend_eval_const_expr(&ast->child[1]);
|
||||
|
||||
class_ast = ast->child[0];
|
||||
name_ast = ast->child[1];
|
||||
|
||||
if (name_ast->kind == ZEND_AST_ZVAL && zend_string_equals_literal_ci(zend_ast_get_str(name_ast), "class")) {
|
||||
zend_error_noreturn(E_COMPILE_ERROR,
|
||||
|
||||
@@ -108,7 +108,7 @@ static void zend_generator_cleanup_unfinished_execution(
|
||||
if (UNEXPECTED(generator->frozen_call_stack)) {
|
||||
zend_generator_restore_call_stack(generator);
|
||||
}
|
||||
zend_cleanup_unfinished_execution(execute_data, op_num, 0);
|
||||
zend_cleanup_unfinished_execution(execute_data, op_num, catch_op_num);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
+2
-1
@@ -119,7 +119,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
|
||||
PHP_MAJOR_VERSION=7
|
||||
PHP_MINOR_VERSION=1
|
||||
PHP_RELEASE_VERSION=5
|
||||
PHP_RELEASE_VERSION=6
|
||||
PHP_EXTRA_VERSION=""
|
||||
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
|
||||
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
|
||||
@@ -494,6 +494,7 @@ limits.h \
|
||||
locale.h \
|
||||
monetary.h \
|
||||
netdb.h \
|
||||
poll.h \
|
||||
pwd.h \
|
||||
resolv.h \
|
||||
signal.h \
|
||||
|
||||
@@ -88,6 +88,10 @@ ZEND_BEGIN_ARG_INFO_EX( collator_sort_args, 0, 0, 1 )
|
||||
ZEND_ARG_INFO( 0, flags )
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX( collator_sort_with_sort_keys_args, 0, 0, 1 )
|
||||
ZEND_ARG_ARRAY_INFO( 1, arr, 0 )
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ Collator_class_functions
|
||||
@@ -99,7 +103,7 @@ zend_function_entry Collator_class_functions[] = {
|
||||
ZEND_FENTRY( create, ZEND_FN( collator_create ), collator_1_arg, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
PHP_NAMED_FE( compare, ZEND_FN( collator_compare ), collator_2_args )
|
||||
PHP_NAMED_FE( sort, ZEND_FN( collator_sort ), collator_sort_args )
|
||||
PHP_NAMED_FE( sortWithSortKeys, ZEND_FN( collator_sort_with_sort_keys ), collator_sort_args )
|
||||
PHP_NAMED_FE( sortWithSortKeys, ZEND_FN( collator_sort_with_sort_keys ), collator_sort_with_sort_keys_args )
|
||||
PHP_NAMED_FE( asort, ZEND_FN( collator_asort ), collator_sort_args )
|
||||
PHP_NAMED_FE( getAttribute, ZEND_FN( collator_get_attribute ), collator_1_arg )
|
||||
PHP_NAMED_FE( setAttribute, ZEND_FN( collator_set_attribute ), collator_2_args )
|
||||
|
||||
+6
-1
@@ -154,6 +154,11 @@ ZEND_BEGIN_ARG_INFO_EX(collator_sort_args, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, sort_flags)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(collator_sort_with_sort_keys_args, 0, 0, 2)
|
||||
ZEND_ARG_OBJ_INFO(0, coll, Collator, 0)
|
||||
ZEND_ARG_ARRAY_INFO(1, arr, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(numfmt_parse_arginfo, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, formatter)
|
||||
ZEND_ARG_INFO(0, string)
|
||||
@@ -629,7 +634,7 @@ zend_function_entry intl_functions[] = {
|
||||
PHP_FE( collator_get_strength, collator_0_args )
|
||||
PHP_FE( collator_set_strength, collator_1_arg )
|
||||
PHP_FE( collator_sort, collator_sort_args )
|
||||
PHP_FE( collator_sort_with_sort_keys, collator_sort_args )
|
||||
PHP_FE( collator_sort_with_sort_keys, collator_sort_with_sort_keys_args )
|
||||
PHP_FE( collator_asort, collator_sort_args )
|
||||
PHP_FE( collator_get_locale, collator_1_arg )
|
||||
PHP_FE( collator_get_error_code, collator_0_args )
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
--TEST--
|
||||
Bug #74468 Wrong reflection on Collator::sortWithSortKeys
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$rm = new ReflectionMethod(Collator::class, 'sortWithSortKeys');
|
||||
var_dump($rm->getNumberOfParameters());
|
||||
var_dump($rm->getNumberOfRequiredParameters());
|
||||
|
||||
$rf = new ReflectionFunction('collator_sort_with_sort_keys');
|
||||
var_dump($rf->getNumberOfParameters());
|
||||
var_dump($rf->getNumberOfRequiredParameters());
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
int(1)
|
||||
int(1)
|
||||
int(2)
|
||||
int(2)
|
||||
===DONE===
|
||||
@@ -19,8 +19,8 @@ var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_LONG, 'pt_PT'));
|
||||
|
||||
?>
|
||||
==DONE==
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
string(30) "Western European Standard Time"
|
||||
string(30) "Western European Standard Time"
|
||||
string(32) "Hora Padrão da Europa Ocidental"
|
||||
string(32) "Hora %cadrão da Europa Ocidental"
|
||||
==DONE==
|
||||
@@ -619,7 +619,7 @@ PHP_FUNCTION(mysqli_change_user)
|
||||
const CHARSET_INFO * old_charset;
|
||||
#endif
|
||||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Osss", &mysql_link, mysqli_link_class_entry, &user, &user_len, &password, &password_len, &dbname, &dbname_len) == FAILURE) {
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Osss!", &mysql_link, mysqli_link_class_entry, &user, &user_len, &password, &password_len, &dbname, &dbname_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
|
||||
|
||||
+30
-6
@@ -261,6 +261,17 @@ ZEND_END_ARG_INFO()
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_query, 0, 0, 2)
|
||||
MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
|
||||
ZEND_ARG_INFO(0, query)
|
||||
ZEND_ARG_INFO(0, resultmode)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_multi_query, 0, 0, 1)
|
||||
MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
|
||||
ZEND_ARG_INFO(0, query)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_real_query, 0, 0, 1)
|
||||
MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
|
||||
ZEND_ARG_INFO(0, query)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_prepare, 0, 0, 2)
|
||||
@@ -275,6 +286,19 @@ ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_query, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, query)
|
||||
ZEND_ARG_INFO(0, resultmode)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_prepare, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, query)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_multi_query, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, query)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_real_query, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, query)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_options, 0, 0, 3)
|
||||
@@ -442,7 +466,7 @@ const zend_function_entry mysqli_functions[] = {
|
||||
PHP_FE(mysqli_insert_id, arginfo_mysqli_only_link)
|
||||
PHP_FE(mysqli_kill, arginfo_mysqli_kill)
|
||||
PHP_FE(mysqli_more_results, arginfo_mysqli_only_link)
|
||||
PHP_FE(mysqli_multi_query, arginfo_mysqli_query)
|
||||
PHP_FE(mysqli_multi_query, arginfo_mysqli_multi_query)
|
||||
PHP_FE(mysqli_next_result, arginfo_mysqli_only_link)
|
||||
PHP_FE(mysqli_num_fields, arginfo_mysqli_only_result)
|
||||
PHP_FE(mysqli_num_rows, arginfo_mysqli_only_result)
|
||||
@@ -456,7 +480,7 @@ const zend_function_entry mysqli_functions[] = {
|
||||
PHP_FE(mysqli_query, arginfo_mysqli_query)
|
||||
PHP_FE(mysqli_real_connect, arginfo_mysqli_real_connect)
|
||||
PHP_FE(mysqli_real_escape_string, arginfo_mysqli_real_escape_string)
|
||||
PHP_FE(mysqli_real_query, arginfo_mysqli_query)
|
||||
PHP_FE(mysqli_real_query, arginfo_mysqli_real_query)
|
||||
#if defined(MYSQLI_USE_MYSQLND)
|
||||
PHP_FE(mysqli_reap_async_query, arginfo_mysqli_only_link)
|
||||
#endif
|
||||
@@ -542,7 +566,7 @@ const zend_function_entry mysqli_link_methods[] = {
|
||||
PHP_FALIAS(get_warnings, mysqli_get_warnings, arginfo_mysqli_no_params)
|
||||
PHP_FALIAS(init,mysqli_init_method, arginfo_mysqli_no_params)
|
||||
PHP_FALIAS(kill,mysqli_kill, arginfo_class_mysqli_kill)
|
||||
PHP_FALIAS(multi_query, mysqli_multi_query, arginfo_class_mysqli_query)
|
||||
PHP_FALIAS(multi_query, mysqli_multi_query, arginfo_class_mysqli_multi_query)
|
||||
PHP_FALIAS(__construct, mysqli_link_construct, arginfo_mysqli_connect)
|
||||
PHP_FALIAS(more_results, mysqli_more_results, arginfo_mysqli_no_params)
|
||||
PHP_FALIAS(next_result, mysqli_next_result, arginfo_mysqli_no_params)
|
||||
@@ -551,7 +575,7 @@ const zend_function_entry mysqli_link_methods[] = {
|
||||
#if defined(MYSQLI_USE_MYSQLND)
|
||||
ZEND_FENTRY(poll, ZEND_FN(mysqli_poll), arginfo_mysqli_poll, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
|
||||
#endif
|
||||
PHP_FALIAS(prepare, mysqli_prepare, arginfo_class_mysqli_query)
|
||||
PHP_FALIAS(prepare, mysqli_prepare, arginfo_class_mysqli_prepare)
|
||||
PHP_FALIAS(query, mysqli_query, arginfo_class_mysqli_query)
|
||||
PHP_FALIAS(real_connect, mysqli_real_connect, arginfo_class_mysqli_real_connect)
|
||||
PHP_FALIAS(real_escape_string, mysqli_real_escape_string, arginfo_class_mysqli_real_escape_string)
|
||||
@@ -559,7 +583,7 @@ const zend_function_entry mysqli_link_methods[] = {
|
||||
PHP_FALIAS(reap_async_query, mysqli_reap_async_query, arginfo_mysqli_no_params)
|
||||
#endif
|
||||
PHP_FALIAS(escape_string, mysqli_real_escape_string, arginfo_class_mysqli_real_escape_string)
|
||||
PHP_FALIAS(real_query, mysqli_real_query, arginfo_class_mysqli_query)
|
||||
PHP_FALIAS(real_query, mysqli_real_query, arginfo_class_mysqli_real_query)
|
||||
PHP_FALIAS(release_savepoint, mysqli_release_savepoint, arginfo_class_mysqli_release_savepoint)
|
||||
PHP_FALIAS(rollback, mysqli_rollback, arginfo_class_mysqli_rollback)
|
||||
PHP_FALIAS(savepoint, mysqli_savepoint, arginfo_class_mysqli_savepoint)
|
||||
@@ -628,7 +652,7 @@ const zend_function_entry mysqli_stmt_methods[] = {
|
||||
PHP_FALIAS(send_long_data, mysqli_stmt_send_long_data, arginfo_class_mysqli_stmt_send_long_data)
|
||||
PHP_FALIAS(free_result, mysqli_stmt_free_result, arginfo_mysqli_no_params)
|
||||
PHP_FALIAS(reset, mysqli_stmt_reset, arginfo_mysqli_no_params)
|
||||
PHP_FALIAS(prepare, mysqli_stmt_prepare, arginfo_class_mysqli_query)
|
||||
PHP_FALIAS(prepare, mysqli_stmt_prepare, arginfo_class_mysqli_prepare)
|
||||
PHP_FALIAS(store_result, mysqli_stmt_store_result, arginfo_mysqli_no_params)
|
||||
#if defined(MYSQLI_USE_MYSQLND)
|
||||
PHP_FALIAS(get_result, mysqli_stmt_get_result, arginfo_mysqli_no_params)
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
--TEST--
|
||||
Bug #74547 mysqli::change_user() doesn't accept null as $database argument w/strict_types
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once('skipif.inc');
|
||||
require_once('skipifconnectfailure.inc');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
require_once("connect.inc");
|
||||
|
||||
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
|
||||
printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
|
||||
$host, $user, $db, $port, $socket);
|
||||
|
||||
var_dump(mysqli_change_user($link, $user, $passwd, NULL));
|
||||
|
||||
mysqli_close($link);
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
===DONE===
|
||||
@@ -0,0 +1,25 @@
|
||||
--TEST--
|
||||
Bug #74595 (ReflectionMethod::getParameters returns incorrect number of parameters)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once('skipif.inc');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$class = new ReflectionClass('mysqli');
|
||||
$method = $class->getMethod('query');
|
||||
var_dump($method->getParameters());
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(2) {
|
||||
[0]=>
|
||||
object(ReflectionParameter)#%d (1) {
|
||||
["name"]=>
|
||||
string(5) "query"
|
||||
}
|
||||
[1]=>
|
||||
object(ReflectionParameter)#%d (1) {
|
||||
["name"]=>
|
||||
string(10) "resultmode"
|
||||
}
|
||||
}
|
||||
@@ -732,7 +732,7 @@ isInternal: yes
|
||||
isUserDefined: no
|
||||
returnsReference: no
|
||||
Modifiers: 256
|
||||
Number of Parameters: 1
|
||||
Number of Parameters: 2
|
||||
Number of Required Parameters: 1
|
||||
|
||||
Inspecting parameter 'query' of method 'query'
|
||||
@@ -742,6 +742,13 @@ isPassedByReference: no
|
||||
isOptional: no
|
||||
isDefaultValueAvailable: no
|
||||
|
||||
Inspecting parameter 'resultmode' of method 'query'
|
||||
isArray: no
|
||||
allowsNull: no
|
||||
isPassedByReference: no
|
||||
isOptional: yes
|
||||
isDefaultValueAvailable: no
|
||||
|
||||
Inspecting method 'real_connect'
|
||||
isFinal: no
|
||||
isAbstract: no
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
--TEST--
|
||||
Bug #74432, BC issue on undocumented connect string
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once('skipif.inc');
|
||||
require_once('skipifemb.inc');
|
||||
require_once('skipifconnectfailure.inc');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
/* This behavior is undocumented, but might be in use. Until there's no officially
|
||||
supported alternative, ensure changes doesn't cause BC breach. Otherwise,
|
||||
the test should be removed once the undocumented behavior changes. */
|
||||
|
||||
require_once("connect.inc");
|
||||
|
||||
$handle = mysqli_connect("$host:$port", $user, $passwd);
|
||||
|
||||
var_dump($handle);
|
||||
|
||||
if ($handle) {
|
||||
mysqli_close($handle);
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
object(mysqli)#%d (%d) {
|
||||
%A
|
||||
}
|
||||
|
||||
@@ -1712,7 +1712,10 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
|
||||
return accelerator_orig_compile_file(file_handle, type);
|
||||
}
|
||||
persistent_script = zend_accel_hash_str_find(&ZCSG(hash), key, key_length);
|
||||
} else if (UNEXPECTED(is_stream_path(file_handle->filename) && !is_cacheable_stream_path(file_handle->filename))) {
|
||||
return accelerator_orig_compile_file(file_handle, type);
|
||||
}
|
||||
|
||||
if (!persistent_script) {
|
||||
/* try to find cached script by full real path */
|
||||
zend_accel_hash_entry *bucket;
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
--TEST--
|
||||
Bug #74596 (SIGSEGV with opcache.revalidate_path enabled)
|
||||
--INI--
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
opcache.file_update_protection=0
|
||||
opcache.validate_timestamps=0
|
||||
opcache.file_cache_only=0
|
||||
opcache.revalidate_path=1
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
file_put_contents(__DIR__ . "/bug74596_1.php", <<<CODE
|
||||
<?php
|
||||
class A {
|
||||
public function __construct() {
|
||||
\$a = true;
|
||||
if (\$a) {
|
||||
echo 1 + 2;
|
||||
} else {
|
||||
echo 2 + 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
CODE
|
||||
);
|
||||
|
||||
file_put_contents(__DIR__ . "/bug74596_2.php", "ok\n");
|
||||
|
||||
class ufilter extends php_user_filter
|
||||
{
|
||||
function filter($in, $out, &$consumed, $closing)
|
||||
{
|
||||
include_once __DIR__ . "/bug74596_1.php";
|
||||
while ($bucket = stream_bucket_make_writeable($in)) {
|
||||
stream_bucket_append($out, $bucket);
|
||||
}
|
||||
return PSFS_PASS_ON;
|
||||
}
|
||||
}
|
||||
|
||||
stream_filter_register("ufilter", "ufilter");
|
||||
|
||||
include "php://filter/read=ufilter/resource=" . __DIR__ . "/bug74596_2.php";
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
unlink(__DIR__ . "/bug74596_1.php");
|
||||
unlink(__DIR__ . "/bug74596_2.php");
|
||||
?>
|
||||
--EXPECT--
|
||||
ok
|
||||
@@ -2941,6 +2941,7 @@ PHP_FUNCTION(openssl_pkcs12_read)
|
||||
|
||||
if (d2i_PKCS12_bio(bio_in, &p12) && PKCS12_parse(p12, pass, &pkey, &cert, &ca)) {
|
||||
BIO * bio_out;
|
||||
int cert_num;
|
||||
|
||||
zval_dtor(zout);
|
||||
array_init(zout);
|
||||
@@ -2971,10 +2972,11 @@ PHP_FUNCTION(openssl_pkcs12_read)
|
||||
BIO_free(bio_out);
|
||||
}
|
||||
|
||||
if (ca && sk_X509_num(ca)) {
|
||||
cert_num = sk_X509_num(ca);
|
||||
if (ca && cert_num) {
|
||||
array_init(&zextracerts);
|
||||
|
||||
for (i = 0; i < sk_X509_num(ca); i++) {
|
||||
for (i = 0; i < cert_num; i++) {
|
||||
zval zextracert;
|
||||
X509* aCA = sk_X509_pop(ca);
|
||||
if (!aCA) break;
|
||||
@@ -6214,9 +6216,7 @@ static int php_openssl_validate_iv(char **piv, size_t *piv_len, size_t iv_requir
|
||||
|
||||
if (mode->is_aead) {
|
||||
if (EVP_CIPHER_CTX_ctrl(cipher_ctx, mode->aead_ivlen_flag, *piv_len, NULL) != 1) {
|
||||
php_error_docref(NULL, E_WARNING,
|
||||
"Setting of IV length for AEAD mode failed, the expected length is %zd bytes",
|
||||
iv_required_len);
|
||||
php_error_docref(NULL, E_WARNING, "Setting of IV length for AEAD mode failed");
|
||||
return FAILURE;
|
||||
}
|
||||
return SUCCESS;
|
||||
|
||||
@@ -10,7 +10,7 @@ if (OPENSSL_VERSION_NUMBER < 0x009070af) die("skip");
|
||||
$configargs = array(
|
||||
"req_extensions" => "v3_req",
|
||||
"x509_extensions" => "usr_cert",
|
||||
"config" => __DIR__."/openssl.cnf",
|
||||
"config" => __DIR__. DIRECTORY_SEPARATOR . "openssl.cnf",
|
||||
);
|
||||
|
||||
$dn = array(
|
||||
|
||||
@@ -19,7 +19,7 @@ $csr_info = array(
|
||||
$private = openssl_pkey_new($config);
|
||||
while (openssl_error_string()) {}
|
||||
$csr_res = openssl_csr_new($csr_info, $private,
|
||||
['config' => __DIR__."/openssl.cnf"]);
|
||||
['config' => __DIR__. DIRECTORY_SEPARATOR . "openssl.cnf"]);
|
||||
if (!$csr_res) {
|
||||
while ($e = openssl_error_string()) { $err = $e; }
|
||||
die("Failed; last error: $err");
|
||||
|
||||
@@ -7,11 +7,12 @@ if (!extension_loaded("openssl")) die("skip openssl not loaded");
|
||||
--FILE--
|
||||
<?php
|
||||
$passwords = ["abc\x00defghijkl", "abcdefghikjl"];
|
||||
$conf = ['config' => __DIR__ . DIRECTORY_SEPARATOR . 'openssl.cnf'];
|
||||
|
||||
foreach($passwords as $password) {
|
||||
$key = openssl_pkey_new();
|
||||
$key = openssl_pkey_new($conf);
|
||||
|
||||
if (openssl_pkey_export($key, $privatePEM, $password) === false) {
|
||||
if (openssl_pkey_export($key, $privatePEM, $password, $conf) === false) {
|
||||
echo "Failed to encrypt.\n";
|
||||
} else {
|
||||
echo "Encrypted!\n";
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
Bug #74022 PHP Fast CGI crashes when reading from a pfx file with valid password, multiple extra certs
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("openssl")) die("skip");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
function test($p12_contents, $password) {
|
||||
openssl_pkcs12_read($p12_contents, $cert_data, $password);
|
||||
openssl_error_string();
|
||||
var_dump(count($cert_data['extracerts']));
|
||||
}
|
||||
|
||||
$p12_base64 = 'MIIW+QIBAzCCFr8GCSqGSIb3DQEHAaCCFrAEghasMIIWqDCCEV8GCSqGSIb3DQEHBqCCEVAwghFMAgEAMIIRRQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIQOfCxIAgGIICAggAgIIRGFTkvHpJjCtFjukXYVlhyOIqKiS8Zvg84dX244hhI0S51Uyn/tlXM2GD/3hDNVxcVKwP/fKN21lEkoXoK4h2/5BY3qCdZa3Ef3vk44b/+FGCUAqvsOo1ZjD2P/sBGhLu3aFnQ6ktUXlKV4cnqhlF62AqY4e5efQzmJXn+gI8cSNI5c+qQ0RQgGoRY4nJfvMSZG0/DAkirjGikU/2TZd8LwLkxVUBYbF5/T0fNtA3o99+4tF+8ZRv6ArYjplRdwcBbMbzGhn3ytCq6cmVid9iLjwHJFmvAPXKbmu0Lh5eRRznX9gBWlzGd08Q/ch0MW2ehZTu1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rJzUk8Fc5JAIDGBslkDPg3UNnElcE3cYbcB/ZzjFtgz8ducWKQmI+Yqv4p7BVXji/rHPim8vL6P5xZc95tbIonp5bQH+PPSmcfDk3rrf5mS58dJvWh/UpwcfdVvUAsWLJEV1lUBg1qecVbCsa6Oy7tJ2ZK7e3KdtZrmXiYpSAnSzRNJotr4g4H99brG6IwUx3qk5BE4Line truncated
|
||||
|
||||
$p12 = base64_decode($p12_base64);
|
||||
|
||||
test($p12, 'qwerty');
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
int(2)
|
||||
===DONE===
|
||||
@@ -1,3 +1,10 @@
|
||||
oid_section = new_oids
|
||||
|
||||
[ new_oids ]
|
||||
# Example policies to test their
|
||||
tsa_policy1 = 1.2.3.4.1
|
||||
tsa_policy2 = 1.2.3.4.5.6
|
||||
|
||||
[ req ]
|
||||
default_bits = 1024
|
||||
default_keyfile = privkey.pem
|
||||
|
||||
@@ -35,7 +35,7 @@ var_dump(openssl_decrypt($test['ct'], $method, $test['key'], OPENSSL_RAW_DATA,
|
||||
TEST 0
|
||||
bool(true)
|
||||
|
||||
Warning: openssl_decrypt(): Setting of IV length for AEAD mode failed, the expected length is 12 bytes in %s on line %d
|
||||
Warning: openssl_decrypt(): Setting of IV length for AEAD mode failed in %s on line %d
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
@@ -45,7 +45,7 @@ bool(true)
|
||||
TEST 5
|
||||
bool(true)
|
||||
|
||||
Warning: openssl_decrypt(): Setting of IV length for AEAD mode failed, the expected length is 12 bytes in %s on line %d
|
||||
Warning: openssl_decrypt(): Setting of IV length for AEAD mode failed in %s on line %d
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
@@ -33,7 +33,7 @@ TEST 0
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
Warning: openssl_encrypt(): Setting of IV length for AEAD mode failed, the expected length is 12 bytes in %s on line %d
|
||||
Warning: openssl_encrypt(): Setting of IV length for AEAD mode failed in %s on line %d
|
||||
bool(false)
|
||||
string(8) "p/lvgA=="
|
||||
int(1024)
|
||||
@@ -50,7 +50,7 @@ TEST 5
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
Warning: openssl_encrypt(): Setting of IV length for AEAD mode failed, the expected length is 12 bytes in %s on line %d
|
||||
Warning: openssl_encrypt(): Setting of IV length for AEAD mode failed in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: openssl_encrypt(): Retrieving verification tag failed in %s on line %d
|
||||
|
||||
@@ -3,6 +3,7 @@ sni_server
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("openssl")) die("skip openssl not loaded");
|
||||
if (OPENSSL_VERSION_NUMBER >= 0x10100000) die("skip OpenSSL < v1.1.0 required");
|
||||
--FILE--
|
||||
<?php
|
||||
$serverCode = <<<'CODE'
|
||||
|
||||
+12
-1
@@ -573,7 +573,18 @@ PHP_METHOD(Phar, webPhar)
|
||||
}
|
||||
|
||||
/* retrieve requested file within phar */
|
||||
if (!(SG(request_info).request_method && SG(request_info).request_uri && (!strcmp(SG(request_info).request_method, "GET") || !strcmp(SG(request_info).request_method, "POST")))) {
|
||||
if (!(SG(request_info).request_method
|
||||
&& SG(request_info).request_uri
|
||||
&& (!strcmp(SG(request_info).request_method, "GET")
|
||||
|| !strcmp(SG(request_info).request_method, "POST")
|
||||
|| !strcmp(SG(request_info).request_method, "DELETE")
|
||||
|| !strcmp(SG(request_info).request_method, "HEAD")
|
||||
|| !strcmp(SG(request_info).request_method, "OPTIONS")
|
||||
|| !strcmp(SG(request_info).request_method, "PATCH")
|
||||
|| !strcmp(SG(request_info).request_method, "PUT")
|
||||
)
|
||||
)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ PHP_MINFO_FUNCTION(readline)
|
||||
Reads a line */
|
||||
PHP_FUNCTION(readline)
|
||||
{
|
||||
char *prompt = "";
|
||||
char *prompt = NULL;
|
||||
size_t prompt_len;
|
||||
char *result;
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ $functions = [
|
||||
function(): bool {},
|
||||
function(): array {},
|
||||
function(): callable {},
|
||||
function(): iterable {},
|
||||
function(): StdClass {}
|
||||
];
|
||||
|
||||
@@ -28,4 +29,5 @@ string(6) "string"
|
||||
string(4) "bool"
|
||||
string(5) "array"
|
||||
string(8) "callable"
|
||||
string(8) "iterable"
|
||||
string(8) "StdClass"
|
||||
@@ -2440,6 +2440,10 @@ ZEND_BEGIN_ARG_INFO(arginfo_session_class_updateTimestamp, 0)
|
||||
ZEND_ARG_INFO(0, key)
|
||||
ZEND_ARG_INFO(0, val)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_session_start, 0, 0, 0)
|
||||
ZEND_ARG_INFO(0, options) /* array */
|
||||
ZEND_END_ARG_INFO()
|
||||
/* }}} */
|
||||
|
||||
/* {{{ session_functions[]
|
||||
@@ -2453,7 +2457,7 @@ static const zend_function_entry session_functions[] = {
|
||||
PHP_FE(session_regenerate_id, arginfo_session_regenerate_id)
|
||||
PHP_FE(session_decode, arginfo_session_decode)
|
||||
PHP_FE(session_encode, arginfo_session_void)
|
||||
PHP_FE(session_start, arginfo_session_void)
|
||||
PHP_FE(session_start, arginfo_session_start)
|
||||
PHP_FE(session_destroy, arginfo_session_void)
|
||||
PHP_FE(session_unset, arginfo_session_void)
|
||||
PHP_FE(session_gc, arginfo_session_void)
|
||||
|
||||
@@ -9,6 +9,7 @@ session.name=sid
|
||||
session.save_path=/tmp
|
||||
session.gc_probability=1
|
||||
session.gc_divisor=1
|
||||
session.save_handler=files
|
||||
--FILE--
|
||||
<?php
|
||||
error_reporting(E_ALL);
|
||||
|
||||
@@ -3,6 +3,7 @@ Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write())
|
||||
--INI--
|
||||
session.save_path=
|
||||
session.name=PHPSESSID
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--FILE--
|
||||
|
||||
@@ -3,6 +3,7 @@ Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write())
|
||||
--INI--
|
||||
session.save_path=
|
||||
session.name=PHPSESSID
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--FILE--
|
||||
|
||||
@@ -3,6 +3,7 @@ Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write())
|
||||
--INI--
|
||||
session.save_path=
|
||||
session.name=PHPSESSID
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--FILE--
|
||||
|
||||
@@ -3,6 +3,7 @@ Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write())
|
||||
--INI--
|
||||
session.save_path=
|
||||
session.name=PHPSESSID
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--FILE--
|
||||
|
||||
@@ -3,6 +3,7 @@ Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write())
|
||||
--INI--
|
||||
session.save_path=
|
||||
session.name=PHPSESSID
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--FILE--
|
||||
|
||||
@@ -3,6 +3,7 @@ Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write())
|
||||
--INI--
|
||||
session.save_path=
|
||||
session.name=PHPSESSID
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--FILE--
|
||||
|
||||
@@ -4,6 +4,7 @@ Bug #72940 - SID always defined
|
||||
error_reporting=-1
|
||||
session.save_path=
|
||||
session.name=PHPSESSID
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--COOKIE--
|
||||
|
||||
@@ -4,6 +4,9 @@ Bug #73100 (session_destroy null dereference in ps_files_path_create)
|
||||
<?php
|
||||
if (!extension_loaded('session')) die('skip session extension not available');
|
||||
?>
|
||||
--INI--
|
||||
session.save_path=
|
||||
session.save_handler=files
|
||||
--FILE--
|
||||
<?php
|
||||
ob_start();
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
--TEST--
|
||||
Bug #74541 Wrong reflection on session_start()
|
||||
--SKIPIF--
|
||||
<?php
|
||||
include('skipif.inc');
|
||||
if (!extension_loaded('reflection')) die("skip");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$r = new ReflectionFunction('session_start');
|
||||
var_dump($r->getNumberOfParameters());
|
||||
var_dump($r->getNumberOfRequiredParameters());
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
int(1)
|
||||
int(0)
|
||||
===DONE===
|
||||
@@ -16,6 +16,7 @@ session.upload_progress.prefix=upload_progress_
|
||||
session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS
|
||||
session.upload_progress.freq=1%
|
||||
session.upload_progress.min_freq=0.000000001
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--COOKIE--
|
||||
|
||||
@@ -16,6 +16,7 @@ session.upload_progress.prefix=upload_progress_
|
||||
session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS
|
||||
session.upload_progress.freq=1%
|
||||
session.upload_progress.min_freq=0.000000001
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--COOKIE--
|
||||
|
||||
@@ -15,6 +15,7 @@ session.upload_progress.cleanup=0
|
||||
session.upload_progress.prefix=upload_progress_
|
||||
session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS
|
||||
session.upload_progress.freq=1%
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--COOKIE--
|
||||
|
||||
@@ -15,6 +15,7 @@ session.upload_progress.cleanup=0
|
||||
session.upload_progress.prefix=upload_progress_
|
||||
session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS
|
||||
session.upload_progress.freq=1%
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--COOKIE--
|
||||
|
||||
@@ -16,6 +16,7 @@ session.upload_progress.prefix=upload_progress_
|
||||
session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS
|
||||
session.upload_progress.freq=1%
|
||||
session.upload_progress.min_freq=0.000000001
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--COOKIE--
|
||||
|
||||
@@ -15,6 +15,7 @@ session.upload_progress.cleanup=0
|
||||
session.upload_progress.prefix=upload_progress_
|
||||
session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS
|
||||
session.upload_progress.freq=1%
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--COOKIE--
|
||||
|
||||
@@ -15,6 +15,7 @@ session.upload_progress.cleanup=0
|
||||
session.upload_progress.prefix=upload_progress_
|
||||
session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS
|
||||
session.upload_progress.freq=0
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--COOKIE--
|
||||
|
||||
@@ -15,6 +15,7 @@ session.upload_progress.cleanup=0
|
||||
session.upload_progress.prefix=upload_progress_
|
||||
session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS
|
||||
session.upload_progress.freq=0
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--GET--
|
||||
|
||||
@@ -15,6 +15,7 @@ session.upload_progress.cleanup=0
|
||||
session.upload_progress.prefix=upload_progress_
|
||||
session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS
|
||||
session.upload_progress.freq=0
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--COOKIE--
|
||||
|
||||
@@ -16,6 +16,7 @@ session.upload_progress.cleanup=0
|
||||
session.upload_progress.prefix=upload_progress_
|
||||
session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS
|
||||
session.upload_progress.freq=0
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--COOKIE--
|
||||
|
||||
@@ -15,6 +15,7 @@ session.upload_progress.cleanup=0
|
||||
session.upload_progress.prefix=upload_progress_
|
||||
session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS
|
||||
session.upload_progress.freq=0
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--COOKIE--
|
||||
|
||||
@@ -14,6 +14,7 @@ session.upload_progress.cleanup=0
|
||||
session.upload_progress.prefix=upload_progress_
|
||||
session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS
|
||||
session.upload_progress.freq=0
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--GET--
|
||||
|
||||
@@ -15,6 +15,7 @@ session.upload_progress.cleanup=0
|
||||
session.upload_progress.prefix=upload_progress_
|
||||
session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS
|
||||
session.upload_progress.freq=0
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--POST_RAW--
|
||||
|
||||
@@ -5,6 +5,7 @@ Test session_abort() function : basic functionality
|
||||
--INI--
|
||||
session.save_path=
|
||||
session.name=PHPSESSID
|
||||
session.save_handler=files
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ Test session_module_name() function : variation
|
||||
--INI--
|
||||
session.save_path=
|
||||
session.name=PHPSESSID
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--FILE--
|
||||
|
||||
@@ -3,6 +3,7 @@ Test session_name() function : error functionality
|
||||
--INI--
|
||||
session.save_path=
|
||||
session.name=PHPSESSID
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--FILE--
|
||||
|
||||
@@ -3,6 +3,7 @@ Test session_name() function : variation
|
||||
--INI--
|
||||
session.save_path=
|
||||
session.name=PHPSESSID
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--FILE--
|
||||
|
||||
@@ -5,6 +5,7 @@ Test session_reset() function : basic functionality
|
||||
--INI--
|
||||
session.save_path=
|
||||
session.name=PHPSESSID
|
||||
session.save_handler=files
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ Test session_save_path() function : error functionality
|
||||
session.gc_probability=0
|
||||
session.save_path=
|
||||
session.name=PHPSESSID
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--FILE--
|
||||
|
||||
@@ -4,6 +4,7 @@ Test session_save_path() function : variation
|
||||
session.gc_probability=0
|
||||
session.save_path=
|
||||
session.name=PHPSESSID
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--FILE--
|
||||
|
||||
@@ -4,6 +4,7 @@ Test session_set_save_handler() function : basic functionality
|
||||
session.save_path=
|
||||
session.name=PHPSESSID
|
||||
session.gc_probability=0
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--FILE--
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
Test session_set_save_handler() : basic class wrapping existing handler
|
||||
--INI--
|
||||
session.use_strict_mode=1
|
||||
session.save_handler=files
|
||||
session.name=PHPSESSID
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--FILE--
|
||||
|
||||
@@ -3,6 +3,7 @@ Test session_set_save_handler() function : using closures as callbacks
|
||||
--INI--
|
||||
session.save_path=
|
||||
session.name=PHPSESSID
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--FILE--
|
||||
|
||||
@@ -3,6 +3,7 @@ Test session_set_save_handler() function : error functionality
|
||||
--INI--
|
||||
session.save_path=
|
||||
session.name=PHPSESSID
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--FILE--
|
||||
|
||||
@@ -8,6 +8,7 @@ session.gc_divisor=1
|
||||
session.gc_maxlifetime=0
|
||||
session.save_path=
|
||||
session.name=PHPSESSID
|
||||
session.save_handler=files
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ session.gc_divisor=1
|
||||
session.gc_maxlifetime=0
|
||||
session.save_path=
|
||||
session.name=PHPSESSID
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--FILE--
|
||||
|
||||
@@ -6,6 +6,7 @@ session.lazy_write=1
|
||||
session.save_path=
|
||||
session.name=PHPSESSID
|
||||
session.gc_probability=0
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--FILE--
|
||||
|
||||
@@ -495,7 +495,7 @@ static int spl_fixedarray_object_has_dimension(zval *object, zval *offset, int c
|
||||
|
||||
intern = Z_SPLFIXEDARRAY_P(object);
|
||||
|
||||
if (intern->fptr_offset_get) {
|
||||
if (intern->fptr_offset_has) {
|
||||
zval rv;
|
||||
SEPARATE_ARG_IF_REF(offset);
|
||||
zend_call_method_with_1_params(object, intern->std.ce, &intern->fptr_offset_has, "offsetExists", &rv, offset);
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
--TEST--
|
||||
Overriding SplFixedArray::offsetGet() only
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class MyArray extends SplFixedArray {
|
||||
public function offsetGet($key) {
|
||||
return "prefix_" . parent::offsetGet($key);
|
||||
}
|
||||
}
|
||||
|
||||
$arr = new MyArray(1);
|
||||
var_dump(isset($arr[0]));
|
||||
$arr[0] = "abc";
|
||||
var_dump(isset($arr[0]));
|
||||
var_dump($arr[0]);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(false)
|
||||
bool(true)
|
||||
string(10) "prefix_abc"
|
||||
@@ -1,4 +1,4 @@
|
||||
--TEST--n
|
||||
--TEST--
|
||||
Bug #14580 (key() not binary safe)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
--TEST--
|
||||
Bug #74589 __DIR__ wrong for unicode character, UTF-8
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (substr(PHP_OS, 0, 3) != 'WIN' && PHP_OS != 'Linux') {
|
||||
die('skip Linux or Windows only');
|
||||
}
|
||||
?>
|
||||
--INI--
|
||||
internal_encoding=utf-8
|
||||
--FILE--
|
||||
<?php
|
||||
/*
|
||||
#vim: set fileencoding=utf-8
|
||||
#vim: set encoding=utf-8
|
||||
*/
|
||||
|
||||
$item = "bug74589_新建文件夹"; // utf-8 string
|
||||
$dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . $item;
|
||||
$test_file = $dir . DIRECTORY_SEPARATOR . "test.php";
|
||||
|
||||
mkdir($dir);
|
||||
|
||||
file_put_contents($test_file,
|
||||
"<?php
|
||||
var_dump(__DIR__);
|
||||
var_dump(__FILE__);
|
||||
var_dump(__DIR__ === dirname(__FILE__));");
|
||||
|
||||
$php = getenv('TEST_PHP_EXECUTABLE');
|
||||
|
||||
echo shell_exec("$php -n $test_file");
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
string(%d) "%sbug74589_新建文件夹"
|
||||
string(%d) "%sbug74589_新建文件夹%etest.php"
|
||||
bool(true)
|
||||
===DONE===
|
||||
--CLEAN--
|
||||
<?php
|
||||
$item = "bug74589_新建文件夹"; // utf-8 string
|
||||
$dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . $item;
|
||||
$test_file = $dir . DIRECTORY_SEPARATOR . "test.php";
|
||||
unlink($test_file);
|
||||
rmdir($dir);
|
||||
?>
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
--TEST--
|
||||
Bug #74429 Remote socket URI with unique persistence identifier broken
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
/* This behavior is undocumented, but might be in use. Until there's no officially
|
||||
supported alternative, ensure changes doesn't cause BC breach. Otherwise,
|
||||
the test should be removed once the undocumented behavior changes. */
|
||||
|
||||
for ($i=0; $i<100; $i++) {
|
||||
$port = rand(10000, 65000);
|
||||
/* Setup socket server */
|
||||
$server = @stream_socket_server("tcp://127.0.0.1:$port");
|
||||
if ($server) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$client0 = stream_socket_client("tcp://127.0.0.1:$port/client0");
|
||||
$client1 = stream_socket_client("tcp://127.0.0.1:$port/client1");
|
||||
|
||||
var_dump($client0, $client1);
|
||||
|
||||
fclose($server);
|
||||
fclose($client0);
|
||||
fclose($client1);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
resource(%d) of type (stream)
|
||||
resource(%d) of type (stream)
|
||||
|
||||
@@ -1260,7 +1260,8 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_xmlreader_XML, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, options)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO(arginfo_xmlreader_expand, 0)
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_xmlreader_expand, 0, 0, 0)
|
||||
ZEND_ARG_INFO(0, basenode)
|
||||
ZEND_END_ARG_INFO()
|
||||
/* }}} */
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
XMLReader: Bug #74457 Wrong reflection on XMLReader::expand
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("xmlreader")) die("skip xmlreader extension not available"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$rm = new ReflectionMethod(XMLReader::class, 'expand');
|
||||
var_dump($rm->getNumberOfParameters());
|
||||
var_dump($rm->getNumberOfRequiredParameters());
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
int(1)
|
||||
int(0)
|
||||
===DONE===
|
||||
+4
-2
@@ -76,7 +76,9 @@ static int is_impersonate = 0;
|
||||
# include <netdb.h>
|
||||
# include <signal.h>
|
||||
|
||||
# if defined(HAVE_SYS_POLL_H) && defined(HAVE_POLL)
|
||||
# if defined(HAVE_POLL_H) && defined(HAVE_POLL)
|
||||
# include <poll.h>
|
||||
# elif defined(HAVE_SYS_POLL_H) && defined(HAVE_POLL)
|
||||
# include <sys/poll.h>
|
||||
# endif
|
||||
# if defined(HAVE_SYS_SELECT_H)
|
||||
@@ -1430,7 +1432,7 @@ int fcgi_accept_request(fcgi_request *req)
|
||||
break;
|
||||
#else
|
||||
if (req->fd >= 0) {
|
||||
#if defined(HAVE_SYS_POLL_H) && defined(HAVE_POLL)
|
||||
#if defined(HAVE_POLL)
|
||||
struct pollfd fds;
|
||||
int ret;
|
||||
|
||||
|
||||
+3
-1
@@ -51,7 +51,9 @@
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
#if HAVE_SYS_POLL_H
|
||||
#if HAVE_POLL_H
|
||||
#include <poll.h>
|
||||
#elif HAVE_SYS_POLL_H
|
||||
#include <sys/poll.h>
|
||||
#endif
|
||||
|
||||
|
||||
+2
-2
@@ -280,7 +280,7 @@ static void php_ini_parser_cb(zval *arg1, zval *arg2, zval *arg3, int callback_t
|
||||
size_t key_len;
|
||||
|
||||
/* PATH sections */
|
||||
if (!strncasecmp(Z_STRVAL_P(arg1), "PATH", sizeof("PATH") - 1)) {
|
||||
if (zend_string_equals_literal_ci(Z_STR_P(arg1), "PATH")) {
|
||||
key = Z_STRVAL_P(arg1);
|
||||
key = key + sizeof("PATH") - 1;
|
||||
key_len = Z_STRLEN_P(arg1) - sizeof("PATH") + 1;
|
||||
@@ -291,7 +291,7 @@ static void php_ini_parser_cb(zval *arg1, zval *arg2, zval *arg3, int callback_t
|
||||
TRANSLATE_SLASHES_LOWER(key);
|
||||
|
||||
/* HOST sections */
|
||||
} else if (!strncasecmp(Z_STRVAL_P(arg1), "HOST", sizeof("HOST") - 1)) {
|
||||
} else if (zend_string_equals_literal_ci(Z_STR_P(arg1), "HOST")) {
|
||||
key = Z_STRVAL_P(arg1);
|
||||
key = key + sizeof("HOST") - 1;
|
||||
key_len = Z_STRLEN_P(arg1) - sizeof("HOST") + 1;
|
||||
|
||||
+6
-2
@@ -122,8 +122,12 @@ typedef int php_socket_t;
|
||||
/* uncomment this to debug poll(2) emulation on systems that have poll(2) */
|
||||
/* #define PHP_USE_POLL_2_EMULATION 1 */
|
||||
|
||||
#if defined(HAVE_SYS_POLL_H) && defined(HAVE_POLL)
|
||||
# include <poll.h>
|
||||
#if defined(HAVE_POLL)
|
||||
# if defined(HAVE_POLL_H)
|
||||
# include <poll.h>
|
||||
# elif defined(HAVE_SYS_POLL_H)
|
||||
# include <sys/poll.h>
|
||||
# endif
|
||||
typedef struct pollfd php_pollfd;
|
||||
#else
|
||||
typedef struct _php_pollfd {
|
||||
|
||||
+3
-3
@@ -2,7 +2,7 @@
|
||||
/* edit configure.in to change version number */
|
||||
#define PHP_MAJOR_VERSION 7
|
||||
#define PHP_MINOR_VERSION 1
|
||||
#define PHP_RELEASE_VERSION 5
|
||||
#define PHP_RELEASE_VERSION 6
|
||||
#define PHP_EXTRA_VERSION ""
|
||||
#define PHP_VERSION "7.1.5"
|
||||
#define PHP_VERSION_ID 70105
|
||||
#define PHP_VERSION "7.1.6"
|
||||
#define PHP_VERSION_ID 70106
|
||||
@@ -0,0 +1,38 @@
|
||||
--TEST--
|
||||
Bug #74600 (crash (SIGSEGV) in _zend_hash_add_or_update_i)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!getenv("TEST_PHP_EXECUTABLE")) die("skip TEST_PHP_EXECUTABLE not set");
|
||||
if (substr(PHP_OS, 0, 3) == "WIN") die("skip non windows test");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$php = getenv("TEST_PHP_EXECUTABLE");
|
||||
$ini_file = __DIR__ . "/bug74600.ini";
|
||||
file_put_contents($ini_file, <<<INI
|
||||
[PHP]\n;\rs=\000\000=\n;\r[PATH\000]\000\376 =\n
|
||||
INI
|
||||
);
|
||||
$desc = array(
|
||||
0 => array("pipe", "r"),
|
||||
1 => array("pipe", "w"),
|
||||
2 => array("pipe", "w"),
|
||||
);
|
||||
$pipes = array();
|
||||
$proc = proc_open("$php -c $ini_file -r 'echo \"okey\";'", $desc, $pipes);
|
||||
if (!$proc) {
|
||||
exit(1);
|
||||
}
|
||||
var_dump(stream_get_contents($pipes[1]));
|
||||
var_dump(stream_get_contents($pipes[2]));
|
||||
|
||||
proc_terminate($proc);
|
||||
proc_close($proc);
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
unlink(__DIR__ . "/bug74600.ini");
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(4) "okey"
|
||||
string(0) ""
|
||||
@@ -373,7 +373,7 @@ pm.max_spare_servers = 3
|
||||
; Limits the extensions of the main script FPM will allow to parse. This can
|
||||
; prevent configuration mistakes on the web server side. You should only limit
|
||||
; FPM to .php extensions to prevent malicious users to use other extensions to
|
||||
; exectute php code.
|
||||
; execute php code.
|
||||
; Note: set an empty value to allow all extensions.
|
||||
; Default Value: .php
|
||||
;security.limit_extensions = .php .php3 .php4 .php5 .php7
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
bz2-1.0.6
|
||||
cclient-2007f
|
||||
freetype-2.6.2
|
||||
freetype-2.7.0
|
||||
icu-57.1
|
||||
jpeglib-9b
|
||||
libcurl-7.51.0
|
||||
libiconv-1.14
|
||||
libcurl-7.54.0
|
||||
libiconv-1.15
|
||||
libmcrypt-2.5.8
|
||||
libmpir-2.7.2
|
||||
libpng-1.6.21
|
||||
libpq-9.5.3
|
||||
libmpir-3.0.0
|
||||
libpng-1.6.29
|
||||
libpq-9.6.2
|
||||
libssh2-1.8.0
|
||||
libtidy-20090406
|
||||
libtidy-5.4.0
|
||||
libxslt-1.1.29
|
||||
libxml-2.9.4
|
||||
openssl-1.0.2j
|
||||
openssl-1.0.2k
|
||||
+19
-7
@@ -244,7 +244,9 @@ __forceinline static int php_win32_ioutil_access(const char *path, mode_t mode)
|
||||
PHP_WIN32_IOUTIL_CHECK_PATH_W(pathw, -1, 1)
|
||||
|
||||
ret = _waccess(pathw, mode);
|
||||
_get_errno(&err);
|
||||
if (0 > ret) {
|
||||
_get_errno(&err);
|
||||
}
|
||||
PHP_WIN32_IOUTIL_CLEANUP_W()
|
||||
|
||||
if (0 > ret) {
|
||||
@@ -277,7 +279,9 @@ __forceinline static int php_win32_ioutil_open(const char *path, int flags, ...)
|
||||
}
|
||||
|
||||
ret = php_win32_ioutil_open_w(pathw, flags, mode);
|
||||
err = GetLastError();
|
||||
if (0 > ret) {
|
||||
err = GetLastError();
|
||||
}
|
||||
PHP_WIN32_IOUTIL_CLEANUP_W()
|
||||
|
||||
if (0 > ret) {
|
||||
@@ -366,11 +370,13 @@ __forceinline static FILE *php_win32_ioutil_fopen(const char *patha, const char
|
||||
}
|
||||
|
||||
ret = _wfopen(pathw, modew);
|
||||
_get_errno(&err);
|
||||
if (!ret) {
|
||||
_get_errno(&err);
|
||||
}
|
||||
free(pathw);
|
||||
free(modew);
|
||||
|
||||
if (0 > ret) {
|
||||
if (!ret) {
|
||||
_set_errno(err);
|
||||
}
|
||||
return ret;
|
||||
@@ -403,7 +409,9 @@ __forceinline static int php_win32_ioutil_rename(const char *oldnamea, const cha
|
||||
}
|
||||
|
||||
ret = php_win32_ioutil_rename_w(oldnamew, newnamew);
|
||||
err = GetLastError();
|
||||
if (0 > ret) {
|
||||
err = GetLastError();
|
||||
}
|
||||
|
||||
free(oldnamew);
|
||||
free(newnamew);
|
||||
@@ -427,7 +435,9 @@ __forceinline static int php_win32_ioutil_chdir(const char *patha)
|
||||
}
|
||||
|
||||
ret = php_win32_ioutil_chdir_w(pathw);
|
||||
err = GetLastError();
|
||||
if (0 > ret) {
|
||||
err = GetLastError();
|
||||
}
|
||||
|
||||
free(pathw);
|
||||
|
||||
@@ -493,7 +503,9 @@ __forceinline static int php_win32_ioutil_chmod(const char *patha, int mode)
|
||||
PHP_WIN32_IOUTIL_CHECK_PATH_W(pathw, -1, 1)
|
||||
|
||||
ret = _wchmod(pathw, mode);
|
||||
_get_errno(&err);
|
||||
if (0 > ret) {
|
||||
_get_errno(&err);
|
||||
}
|
||||
|
||||
free(pathw);
|
||||
|
||||
|
||||
+1
-1
@@ -535,7 +535,7 @@ static int SendText(char *RPath, char *Subject, char *mailTo, char *mailCc, char
|
||||
efree(tempMailTo);
|
||||
}
|
||||
else if (headers) {
|
||||
if (pos1 = strstr(headers_lc, "bcc:")) {
|
||||
if ((pos1 = strstr(headers_lc, "bcc:")) && (pos1 == headers_lc || *(pos1-1) == '\n')) {
|
||||
/* Real offset is memaddress from the original headers + difference of
|
||||
* string found in the lowercase headrs + 4 characters to jump over
|
||||
* the bcc: */
|
||||
|
||||
Reference in new issue
Block a user