mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-18 06:26:37 +00:00
Compare commits
97
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cb7b49dcf8 | ||
|
|
763c61db29 | ||
|
|
fcf5bd7e2a | ||
|
|
bb858252ac | ||
|
|
7f68a7afe6 | ||
|
|
408272b8d9 | ||
|
|
fad87a24da | ||
|
|
edb9229b8b | ||
|
|
9552cf6b84 | ||
|
|
b63ea1047a | ||
|
|
cb9785add1 | ||
|
|
2dc75a9e93 | ||
|
|
2d858fbfb1 | ||
|
|
f73e419996 | ||
|
|
6d3d9104e6 | ||
|
|
2d7ada2c0b | ||
|
|
4fb8252186 | ||
|
|
7566742754 | ||
|
|
afe17cc1b6 | ||
|
|
f43097a2d7 | ||
|
|
64b1085464 | ||
|
|
882862563a | ||
|
|
7b7d99839c | ||
|
|
c70220205e | ||
|
|
8b9dd0a301 | ||
|
|
3646604203 | ||
|
|
8e9eeca0b3 | ||
|
|
44a80b64b9 | ||
|
|
6ec25f386f | ||
|
|
5199686873 | ||
|
|
226395a335 | ||
|
|
c34c523467 | ||
|
|
7215261349 | ||
|
|
cec5e30889 | ||
|
|
d80d918547 | ||
|
|
39c6aaa9cc | ||
|
|
fd5ff37db7 | ||
|
|
ce7935e82a | ||
|
|
40ba9f6a1a | ||
|
|
cff35ca0b2 | ||
|
|
788abb8cc8 | ||
|
|
32d128d219 | ||
|
|
45fa7596dc | ||
|
|
57cb01a927 | ||
|
|
838ae016d7 | ||
|
|
d4aff25473 | ||
|
|
f5768eaa2e | ||
|
|
186f9bab45 | ||
|
|
44192ce80b | ||
|
|
3549f48edc | ||
|
|
ab92ffee22 | ||
|
|
ff8da0dcff | ||
|
|
4f508003a9 | ||
|
|
92f71d9d42 | ||
|
|
03713ace23 | ||
|
|
f731477cd7 | ||
|
|
ca7547c9e2 | ||
|
|
e2c30c6a2e | ||
|
|
5e06dad411 | ||
|
|
f23bfc4b43 | ||
|
|
95e405023e | ||
|
|
4ff2665509 | ||
|
|
4be5b4aa25 | ||
|
|
3f8d21b922 | ||
|
|
0c6ff5eafa | ||
|
|
8b7aaad7d6 | ||
|
|
5cb25a2d32 | ||
|
|
767ddb1cd5 | ||
|
|
958e3b93c3 | ||
|
|
06c9633b43 | ||
|
|
f4332a36b4 | ||
|
|
1bb2a4f91c | ||
|
|
665e1f324a | ||
|
|
37ab72768f | ||
|
|
3d09626f0d | ||
|
|
039ca4e219 | ||
|
|
f1cf553437 | ||
|
|
8c04944b66 | ||
|
|
b20362c24b | ||
|
|
0ec7bfaa43 | ||
|
|
54fa0a69f8 | ||
|
|
f1a988af4b | ||
|
|
51d76c346e | ||
|
|
efe69168b4 | ||
|
|
675a9b2831 | ||
|
|
57257a4335 | ||
|
|
766d5846b1 | ||
|
|
7e9479083d | ||
|
|
cab1ea46e7 | ||
|
|
9efd7ddd0a | ||
|
|
217b9e7b41 | ||
|
|
c72957b409 | ||
|
|
ab8177de2c | ||
|
|
12d08db913 | ||
|
|
d94d0dda29 | ||
|
|
86de4d7af6 | ||
|
|
3c939e3f69 |
No files matched your search
@@ -1,6 +1,6 @@
|
||||
--------------------------------------------------------------------
|
||||
The PHP License, version 3.01
|
||||
Copyright (c) 1999 - 2019 The PHP Group. All rights reserved.
|
||||
Copyright (c) 1999 - 2021 The PHP Group. All rights reserved.
|
||||
--------------------------------------------------------------------
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -1,21 +1,59 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? 2021, PHP 8.0.3
|
||||
04 Mar 2021, PHP 8.0.3
|
||||
|
||||
- Core:
|
||||
. Fixed #80706 (mail(): Headers after Bcc headers may be ignored). (cmb)
|
||||
|
||||
- DOM:
|
||||
. Fixed bug #80600 (DOMChildNode::remove() doesn't work on CharacterData
|
||||
nodes). (beberlei)
|
||||
|
||||
- Gettext:
|
||||
. Fixed bug #53251 (bindtextdomain with null dir doesn't return old value).
|
||||
(cmb)
|
||||
|
||||
- MySQLnd:
|
||||
. Fixed bug #78680 (mysqlnd's mysql_clear_password does not transmit
|
||||
null-terminated password). (Daniel Black)
|
||||
. Fixed bug #80713 (SegFault when disabling ATTR_EMULATE_PREPARES and
|
||||
MySQL 8.0). (Nikita)
|
||||
|
||||
- MySQLi:
|
||||
. Fixed bug #74779 (x() and y() truncating floats to integers). (cmb)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #80634 (write_property handler of internal classes is skipped on
|
||||
preloaded JITted code). (Dmitry)
|
||||
. Fixed bug #80682 (opcache doesn't honour pcre.jit option). (Remi)
|
||||
. Fixed bug #80742 (Opcache JIT makes some boolean logic unexpectedly be
|
||||
true). (Dmitry)
|
||||
. Fixed bug #80745 (JIT produces Assert failure and UNKNOWN:0 var_dumps in
|
||||
code involving bitshifts). (Dmitry)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #80747 (Providing RSA key size < 512 generates key that crash
|
||||
PHP). (Nikita)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #75850 (Unclear error message wrt. __halt_compiler() w/o
|
||||
semicolon) (cmb)
|
||||
. Fixed bug #70091 (Phar does not mark UTF-8 filenames in ZIP archives). (cmb)
|
||||
. Fixed bug #53467 (Phar cannot compress large archives). (cmb, lserni)
|
||||
|
||||
- Socket:
|
||||
. Fixed bug #80723 (Different sockets compare as equal (regression in 8.0)).
|
||||
(Nikita)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug#80719 (Iterating after failed ArrayObject::setIteratorClass()
|
||||
causes Segmentation fault). (Nikita)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #80654 (file_get_contents() maxlen fails above (2**31)-1 bytes).
|
||||
(cmb)
|
||||
. Fixed bug #80718 (ext/standard/dl.c fallback code path with syntax error).
|
||||
(Nikita)
|
||||
|
||||
21 Jan 2021, PHP 8.0.2
|
||||
|
||||
@@ -170,7 +208,7 @@ PHP NEWS
|
||||
. Fixed #62004 (SplFileObject: fgets after seek returns wrong line). (cmb)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #77423 (FILTER_VALIDATE_URL accepts URLs with invalid userinfo).
|
||||
. Fixed bug #77423 (FILTER_VALIDATE_URL accepts URLs with invalid userinfo).
|
||||
(CVE-2020-7071) (cmb)
|
||||
. Fixed bug #80366 (Return Value of zend_fstat() not Checked). (sagpant, cmb)
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
--TEST--
|
||||
call_user_func_array() + array_slice() + named arguments
|
||||
--FILE--
|
||||
<?php
|
||||
call_user_func_array('func', array_slice(array: $a, 1, 2));
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot use positional argument after named argument in %s on line %d
|
||||
@@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Promoting require_once warning to exception
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function exception_error_handler($errno, $errstr, $errfile, $errline ) {
|
||||
throw new Exception($errstr);
|
||||
}
|
||||
set_error_handler("exception_error_handler");
|
||||
|
||||
try {
|
||||
$results = require_once 'does-not-exist.php';
|
||||
} catch (Exception $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
};
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
require_once(does-not-exist.php): Failed to open stream: No such file or directory
|
||||
@@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Symtable cache slots may be acquired while cleaning symtable
|
||||
--FILE--
|
||||
<?php
|
||||
class A {
|
||||
// Must be larger than the symtable cache.
|
||||
static $max = 40;
|
||||
function __destruct() {
|
||||
if (self::$max-- < 0) return;
|
||||
$x = 'y';
|
||||
$$x = new a;
|
||||
}
|
||||
}
|
||||
new A;
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
===DONE===
|
||||
+1
-1
@@ -20,7 +20,7 @@
|
||||
#ifndef ZEND_H
|
||||
#define ZEND_H
|
||||
|
||||
#define ZEND_VERSION "4.0.3-dev"
|
||||
#define ZEND_VERSION "4.0.3"
|
||||
|
||||
#define ZEND_ENGINE_3
|
||||
|
||||
|
||||
@@ -3878,6 +3878,7 @@ zend_result zend_compile_func_cufa(znode *result, zend_ast_list *args, zend_stri
|
||||
zend_string *name = zend_resolve_function_name(orig_name, args->child[1]->child[0]->attr, &is_fully_qualified);
|
||||
|
||||
if (zend_string_equals_literal_ci(name, "array_slice")
|
||||
&& !zend_args_contain_unpack_or_named(list)
|
||||
&& list->children == 3
|
||||
&& list->child[1]->kind == ZEND_AST_ZVAL) {
|
||||
zval *zv = zend_ast_get_zval(list->child[1]);
|
||||
|
||||
@@ -123,3 +123,7 @@ class ArithmeticError extends Error
|
||||
class DivisionByZeroError extends ArithmeticError
|
||||
{
|
||||
}
|
||||
|
||||
class UnhandledMatchError extends Error
|
||||
{
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: 3699b51b31e509c11435845c7e0d35a2608dd268 */
|
||||
* Stub hash: 2fa61163fb7db8d87b14f9cf9a42c3cd8093f2a6 */
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Throwable_getMessage, 0, 0, IS_STRING, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
@@ -180,3 +180,8 @@ static const zend_function_entry class_ArithmeticError_methods[] = {
|
||||
static const zend_function_entry class_DivisionByZeroError_methods[] = {
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
|
||||
static const zend_function_entry class_UnhandledMatchError_methods[] = {
|
||||
ZEND_FE_END
|
||||
};
|
||||
+6
-5
@@ -1144,7 +1144,7 @@ static zend_always_inline zend_bool zend_internal_call_should_throw(zend_functio
|
||||
|
||||
static ZEND_COLD void zend_internal_call_arginfo_violation(zend_function *fbc)
|
||||
{
|
||||
zend_error(E_CORE_ERROR, "Arginfo / zpp mismatch during call of %s%s%s()",
|
||||
zend_error(E_ERROR, "Arginfo / zpp mismatch during call of %s%s%s()",
|
||||
fbc->common.scope ? ZSTR_VAL(fbc->common.scope->name) : "",
|
||||
fbc->common.scope ? "::" : "",
|
||||
ZSTR_VAL(fbc->common.function_name));
|
||||
@@ -3396,12 +3396,13 @@ ZEND_API void execute_internal(zend_execute_data *execute_data, zval *return_val
|
||||
|
||||
ZEND_API void zend_clean_and_cache_symbol_table(zend_array *symbol_table) /* {{{ */
|
||||
{
|
||||
/* Clean before putting into the cache, since clean could call dtors,
|
||||
* which could use the cached hash. Also do this before the check for
|
||||
* available cache slots, as those may be used by a dtor as well. */
|
||||
zend_symtable_clean(symbol_table);
|
||||
if (EG(symtable_cache_ptr) >= EG(symtable_cache_limit)) {
|
||||
zend_array_destroy(symbol_table);
|
||||
} else {
|
||||
/* clean before putting into the cache, since clean
|
||||
could call dtors, which could use cached hash */
|
||||
zend_symtable_clean(symbol_table);
|
||||
*(EG(symtable_cache_ptr)++) = symbol_table;
|
||||
}
|
||||
}
|
||||
@@ -4224,7 +4225,7 @@ static zend_never_inline zend_op_array* ZEND_FASTCALL zend_include_or_eval(zval
|
||||
already_compiled:
|
||||
new_op_array = ZEND_FAKE_OP_ARRAY;
|
||||
}
|
||||
} else {
|
||||
} else if (!EG(exception)) {
|
||||
zend_message_dispatcher(
|
||||
(type == ZEND_INCLUDE_ONCE) ?
|
||||
ZMSG_FAILED_INCLUDE_FOPEN : ZMSG_FAILED_REQUIRE_FOPEN,
|
||||
|
||||
@@ -20,3 +20,7 @@ final class Generator implements Iterator
|
||||
|
||||
public function getReturn(): mixed {}
|
||||
}
|
||||
|
||||
class ClosedGeneratorException extends Exception
|
||||
{
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: 18d2bb68729ff622a5c0c124a8822f7ee882c2ec */
|
||||
* Stub hash: 50044c6c8d2a162a988906c0b752a5fe28adb933 */
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Generator_rewind, 0, 0, IS_VOID, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
@@ -46,3 +46,8 @@ static const zend_function_entry class_Generator_methods[] = {
|
||||
ZEND_ME(Generator, getReturn, arginfo_class_Generator_getReturn, ZEND_ACC_PUBLIC)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
|
||||
static const zend_function_entry class_ClosedGeneratorException_methods[] = {
|
||||
ZEND_FE_END
|
||||
};
|
||||
@@ -1608,6 +1608,11 @@ ZEND_API int zend_std_compare_objects(zval *o1, zval *o2) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API int zend_objects_not_comparable(zval *o1, zval *o2)
|
||||
{
|
||||
return ZEND_UNCOMPARABLE;
|
||||
}
|
||||
|
||||
ZEND_API int zend_std_has_property(zend_object *zobj, zend_string *name, int has_set_exists, void **cache_slot) /* {{{ */
|
||||
{
|
||||
int result;
|
||||
|
||||
@@ -213,6 +213,10 @@ ZEND_API int zend_std_compare_objects(zval *o1, zval *o2);
|
||||
ZEND_API int zend_std_get_closure(zend_object *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr, zend_bool check_only);
|
||||
ZEND_API void rebuild_object_properties(zend_object *zobj);
|
||||
|
||||
/* Handler for objects that cannot be meaningfully compared.
|
||||
* Only objects with the same identity will be considered equal. */
|
||||
ZEND_API int zend_objects_not_comparable(zval *o1, zval *o2);
|
||||
|
||||
ZEND_API int zend_check_protected(zend_class_entry *ce, zend_class_entry *scope);
|
||||
|
||||
ZEND_API int zend_check_property_access(zend_object *zobj, zend_string *prop_info_name, zend_bool is_dynamic);
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ jobs:
|
||||
CFLAGS='-fsanitize=undefined,address -DZEND_TRACK_ARENA_ALLOC'
|
||||
LDFLAGS='-fsanitize=undefined,address'
|
||||
runTestsParameters: --asan
|
||||
timeoutInMinutes: 310
|
||||
timeoutInMinutes: 360
|
||||
- template: azure/msan_job.yml
|
||||
parameters:
|
||||
configurationName: DEBUG_ZTS_MSAN
|
||||
|
||||
@@ -51,8 +51,7 @@ jobs:
|
||||
- script: |
|
||||
git clone https://github.com/laravel/framework.git --branch=master --depth=1
|
||||
cd framework
|
||||
#php7.3 /usr/bin/composer require "doctrine/dbal:^3.0" --no-interaction
|
||||
php7.3 /usr/bin/composer install --no-progress
|
||||
php7.4 /usr/bin/composer install --no-progress
|
||||
# Hack to disable a test that hangs on azure
|
||||
sed -i 's/PHP_OS/"Darwin"/' tests/Filesystem/FilesystemTest.php
|
||||
export USE_ZEND_ALLOC=0
|
||||
@@ -65,8 +64,8 @@ jobs:
|
||||
- script: |
|
||||
git clone https://github.com/symfony/symfony.git --depth=1
|
||||
cd symfony
|
||||
php7.3 /usr/bin/composer install --no-progress
|
||||
php7.3 ./phpunit install
|
||||
php7.4 /usr/bin/composer install --no-progress
|
||||
php7.4 ./phpunit install
|
||||
export USE_ZEND_ALLOC=0
|
||||
export USE_TRACKED_ALLOC=1
|
||||
export ASAN_OPTIONS=exitcode=139
|
||||
@@ -96,14 +95,14 @@ jobs:
|
||||
export USE_ZEND_ALLOC=0
|
||||
export USE_TRACKED_ALLOC=1
|
||||
export ASAN_OPTIONS=exitcode=139
|
||||
php7.3 /usr/bin/composer install --no-progress
|
||||
php7.4 /usr/bin/composer install --no-progress
|
||||
php ./phpunit
|
||||
if [ $? -gt 128 ]; then
|
||||
exit 1
|
||||
fi
|
||||
displayName: 'Test PHPUnit'
|
||||
- script: |
|
||||
php7.3 /usr/bin/composer create-project symfony/symfony-demo symfony_demo --no-progress
|
||||
php7.4 /usr/bin/composer create-project symfony/symfony-demo symfony_demo --no-progress
|
||||
cd symfony_demo
|
||||
export USE_ZEND_ALLOC=0
|
||||
export USE_TRACKED_ALLOC=1
|
||||
|
||||
@@ -116,6 +116,7 @@ clean:
|
||||
find . -name \*.so | xargs rm -f
|
||||
find . -name .libs -a -type d|xargs rm -rf
|
||||
rm -f libphp.la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
|
||||
rm -f ext/opcache/jit/zend_jit_x86.c
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h main/internal_functions_cli.c main/internal_functions.c Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak Zend/zend_config.h
|
||||
@@ -124,7 +125,6 @@ distclean: clean
|
||||
rm -f scripts/man1/phpize.1 scripts/php-config scripts/man1/php-config.1 sapi/cli/php.1 sapi/cgi/php-cgi.1 sapi/phpdbg/phpdbg.1 ext/phar/phar.1 ext/phar/phar.phar.1
|
||||
rm -f sapi/fpm/php-fpm.conf sapi/fpm/init.d.php-fpm sapi/fpm/php-fpm.service sapi/fpm/php-fpm.8 sapi/fpm/status.html
|
||||
rm -f ext/phar/phar.phar ext/phar/phar.php
|
||||
rm -f ext/opcache/jit/zend_jit_x86.c
|
||||
if test "$(srcdir)" != "$(builddir)"; then \
|
||||
rm -f ext/phar/phar/phar.inc; \
|
||||
fi
|
||||
|
||||
+2
-1
@@ -793,9 +793,10 @@ class FuncInfo {
|
||||
}
|
||||
|
||||
if ($namespace) {
|
||||
// Render A\B as "A\\B" in C strings for namespaces
|
||||
return sprintf(
|
||||
"\tZEND_NS_FE(\"%s\", %s, %s)\n",
|
||||
$namespace, $declarationName, $this->getArgInfoName());
|
||||
addslashes($namespace), $declarationName, $this->getArgInfoName());
|
||||
} else {
|
||||
return sprintf("\tZEND_FE(%s, %s)\n", $declarationName, $this->getArgInfoName());
|
||||
}
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ dnl Basic autoconf initialization, generation of config.nice.
|
||||
dnl ----------------------------------------------------------------------------
|
||||
|
||||
AC_PREREQ([2.68])
|
||||
AC_INIT([PHP],[8.0.3-dev],[https://bugs.php.net],[php],[https://www.php.net])
|
||||
AC_INIT([PHP],[8.0.3],[https://bugs.php.net],[php],[https://www.php.net])
|
||||
AC_CONFIG_SRCDIR([main/php_version.h])
|
||||
AC_CONFIG_AUX_DIR([build])
|
||||
AC_PRESERVE_HELP_ORDER
|
||||
|
||||
@@ -1200,6 +1200,7 @@ PHP_MINIT_FUNCTION(curl)
|
||||
curl_object_handlers.get_constructor = curl_get_constructor;
|
||||
curl_object_handlers.clone_obj = curl_clone_obj;
|
||||
curl_object_handlers.cast_object = curl_cast_object;
|
||||
curl_object_handlers.compare = zend_objects_not_comparable;
|
||||
|
||||
curl_multi_register_class(class_CurlMultiHandle_methods);
|
||||
curl_share_register_class(class_CurlShareHandle_methods);
|
||||
@@ -2046,6 +2047,7 @@ static inline int build_mime_structure_from_hash(php_curl *ch, zval *zpostfields
|
||||
#endif
|
||||
|
||||
prop = zend_read_property(curl_CURLFile_class, Z_OBJ_P(current), "name", sizeof("name")-1, 0, &rv);
|
||||
ZVAL_DEREF(prop);
|
||||
if (Z_TYPE_P(prop) != IS_STRING) {
|
||||
php_error_docref(NULL, E_WARNING, "Invalid filename for key %s", ZSTR_VAL(string_key));
|
||||
} else {
|
||||
@@ -2056,10 +2058,12 @@ static inline int build_mime_structure_from_hash(php_curl *ch, zval *zpostfields
|
||||
}
|
||||
|
||||
prop = zend_read_property(curl_CURLFile_class, Z_OBJ_P(current), "mime", sizeof("mime")-1, 0, &rv);
|
||||
ZVAL_DEREF(prop);
|
||||
if (Z_TYPE_P(prop) == IS_STRING && Z_STRLEN_P(prop) > 0) {
|
||||
type = Z_STRVAL_P(prop);
|
||||
}
|
||||
prop = zend_read_property(curl_CURLFile_class, Z_OBJ_P(current), "postname", sizeof("postname")-1, 0, &rv);
|
||||
ZVAL_DEREF(prop);
|
||||
if (Z_TYPE_P(prop) == IS_STRING && Z_STRLEN_P(prop) > 0) {
|
||||
filename = Z_STRVAL_P(prop);
|
||||
}
|
||||
|
||||
@@ -603,4 +603,5 @@ void curl_multi_register_class(const zend_function_entry *method_entries) {
|
||||
curl_multi_handlers.get_constructor = curl_multi_get_constructor;
|
||||
curl_multi_handlers.clone_obj = NULL;
|
||||
curl_multi_handlers.cast_object = curl_cast_object;
|
||||
curl_multi_handlers.compare = zend_objects_not_comparable;
|
||||
}
|
||||
@@ -176,4 +176,5 @@ void curl_share_register_class(const zend_function_entry *method_entries) {
|
||||
curl_share_handlers.free_obj = curl_share_free_obj;
|
||||
curl_share_handlers.get_constructor = curl_share_get_constructor;
|
||||
curl_share_handlers.clone_obj = NULL;
|
||||
curl_share_handlers.compare = zend_objects_not_comparable;
|
||||
}
|
||||
@@ -48,7 +48,7 @@ PSL => No
|
||||
HTTPS_PROXY => Yes
|
||||
MULTI_SSL => %s
|
||||
BROTLI => %s
|
||||
Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, %r(mqtt, )?%rpop3, pop3s, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp
|
||||
Protocols => dict, file, ftp, ftps, gopher, %r(gophers, )?%rhttp, https, imap, imaps, ldap, ldaps, %r(mqtt, )?%rpop3, pop3s, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp
|
||||
Host => %s-pc-win32
|
||||
SSL Version => OpenSSL/%s
|
||||
ZLib Version => %s
|
||||
|
||||
+2
-34
@@ -349,9 +349,8 @@ PHP_METHOD(DOMCharacterData, replaceData)
|
||||
PHP_METHOD(DOMCharacterData, remove)
|
||||
{
|
||||
zval *id = ZEND_THIS;
|
||||
xmlNodePtr children, child;
|
||||
xmlNodePtr child;
|
||||
dom_object *intern;
|
||||
int stricterror;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
@@ -359,38 +358,7 @@ PHP_METHOD(DOMCharacterData, remove)
|
||||
|
||||
DOM_GET_OBJ(child, id, xmlNodePtr, intern);
|
||||
|
||||
if (dom_node_children_valid(child) == FAILURE) {
|
||||
RETURN_NULL();
|
||||
}
|
||||
|
||||
stricterror = dom_get_strict_error(intern->document);
|
||||
|
||||
if (dom_node_is_read_only(child) == SUCCESS ||
|
||||
(child->parent != NULL && dom_node_is_read_only(child->parent) == SUCCESS)) {
|
||||
php_dom_throw_error(NO_MODIFICATION_ALLOWED_ERR, stricterror);
|
||||
RETURN_NULL();
|
||||
}
|
||||
|
||||
if (!child->parent) {
|
||||
php_dom_throw_error(NOT_FOUND_ERR, stricterror);
|
||||
RETURN_NULL();
|
||||
}
|
||||
|
||||
children = child->parent->children;
|
||||
if (!children) {
|
||||
php_dom_throw_error(NOT_FOUND_ERR, stricterror);
|
||||
RETURN_NULL();
|
||||
}
|
||||
|
||||
while (children) {
|
||||
if (children == child) {
|
||||
xmlUnlinkNode(child);
|
||||
RETURN_NULL();
|
||||
}
|
||||
children = children->next;
|
||||
}
|
||||
|
||||
php_dom_throw_error(NOT_FOUND_ERR, stricterror);
|
||||
dom_child_node_remove(intern);
|
||||
RETURN_NULL();
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -986,7 +986,7 @@ PHP_METHOD(DOMDocument, getElementsByTagNameNS)
|
||||
xmlChar *local, *nsuri;
|
||||
|
||||
id = ZEND_THIS;
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &uri, &uri_len, &name, &name_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s!s", &uri, &uri_len, &name, &name_len) == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@@ -995,7 +995,7 @@ PHP_METHOD(DOMDocument, getElementsByTagNameNS)
|
||||
php_dom_create_iterator(return_value, DOM_NODELIST);
|
||||
namednode = Z_DOMOBJ_P(return_value);
|
||||
local = xmlCharStrndup(name, name_len);
|
||||
nsuri = xmlCharStrndup(uri, uri_len);
|
||||
nsuri = xmlCharStrndup(uri ? uri : "", uri_len);
|
||||
dom_namednode_iter(intern, 0, namednode, NULL, local, nsuri);
|
||||
}
|
||||
/* }}} end dom_document_get_elements_by_tag_name_ns */
|
||||
|
||||
@@ -127,7 +127,7 @@ PHP_METHOD(DOMImplementation, createDocument)
|
||||
char *prefix = NULL, *localname = NULL;
|
||||
dom_object *doctobj;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|ssO!", &uri, &uri_len, &name, &name_len, &node, dom_documenttype_class_entry) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s!sO!", &uri, &uri_len, &name, &name_len, &node, dom_documenttype_class_entry) == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -933,7 +933,7 @@ PHP_METHOD(DOMElement, getElementsByTagNameNS)
|
||||
xmlChar *local, *nsuri;
|
||||
|
||||
id = ZEND_THIS;
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &uri, &uri_len, &name, &name_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s!s", &uri, &uri_len, &name, &name_len) == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@@ -942,7 +942,7 @@ PHP_METHOD(DOMElement, getElementsByTagNameNS)
|
||||
php_dom_create_iterator(return_value, DOM_NODELIST);
|
||||
namednode = Z_DOMOBJ_P(return_value);
|
||||
local = xmlCharStrndup(name, name_len);
|
||||
nsuri = xmlCharStrndup(uri, uri_len);
|
||||
nsuri = xmlCharStrndup(uri ? uri : "", uri_len);
|
||||
dom_namednode_iter(intern, 0, namednode, NULL, local, nsuri);
|
||||
|
||||
}
|
||||
|
||||
@@ -374,10 +374,6 @@ void dom_child_node_remove(dom_object *context)
|
||||
xmlNodePtr children;
|
||||
int stricterror;
|
||||
|
||||
if (dom_node_children_valid(child) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
stricterror = dom_get_strict_error(context->document);
|
||||
|
||||
if (dom_node_is_read_only(child) == SUCCESS ||
|
||||
@@ -391,6 +387,10 @@ void dom_child_node_remove(dom_object *context)
|
||||
return;
|
||||
}
|
||||
|
||||
if (dom_node_children_valid(child->parent) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
children = child->parent->children;
|
||||
if (!children) {
|
||||
php_dom_throw_error(NOT_FOUND_ERR, stricterror);
|
||||
|
||||
+18
-14
@@ -2,16 +2,16 @@
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
class DOMDocumentType
|
||||
class DOMDocumentType extends DOMNode
|
||||
{
|
||||
}
|
||||
|
||||
class DOMCdataSection
|
||||
class DOMCdataSection extends DOMText
|
||||
{
|
||||
public function __construct(string $data) {}
|
||||
}
|
||||
|
||||
class DOMComment
|
||||
class DOMComment extends DOMCharacterData
|
||||
{
|
||||
public function __construct(string $data = "") {}
|
||||
}
|
||||
@@ -93,6 +93,10 @@ class DOMNode
|
||||
public function replaceChild(DOMNode $node, DOMNode $child) {}
|
||||
}
|
||||
|
||||
class DOMNameSpaceNode
|
||||
{
|
||||
}
|
||||
|
||||
class DOMImplementation
|
||||
{
|
||||
/** @return void */
|
||||
@@ -105,10 +109,10 @@ class DOMImplementation
|
||||
public function createDocumentType(string $qualifiedName, string $publicId = "", string $systemId = "") {}
|
||||
|
||||
/** @return DOMDocument|false */
|
||||
public function createDocument(string $namespace = "", string $qualifiedName = "", ?DOMDocumentType $doctype = null) {}
|
||||
public function createDocument(?string $namespace = null, string $qualifiedName = "", ?DOMDocumentType $doctype = null) {}
|
||||
}
|
||||
|
||||
class DOMDocumentFragment implements DOMParentNode
|
||||
class DOMDocumentFragment extends DOMNode implements DOMParentNode
|
||||
{
|
||||
public function __construct() {}
|
||||
|
||||
@@ -133,7 +137,7 @@ class DOMNodeList implements IteratorAggregate, Countable
|
||||
public function item(int $index) {}
|
||||
}
|
||||
|
||||
class DOMCharacterData implements DOMChildNode
|
||||
class DOMCharacterData extends DOMNode implements DOMChildNode
|
||||
{
|
||||
/** @return bool */
|
||||
public function appendData(string $data) {}
|
||||
@@ -162,7 +166,7 @@ class DOMCharacterData implements DOMChildNode
|
||||
public function after(...$nodes): void {}
|
||||
}
|
||||
|
||||
class DOMAttr
|
||||
class DOMAttr extends DOMNode
|
||||
{
|
||||
public function __construct(string $name, string $value = "") {}
|
||||
|
||||
@@ -170,7 +174,7 @@ class DOMAttr
|
||||
public function isId() {}
|
||||
}
|
||||
|
||||
class DOMElement implements DOMParentNode, DOMChildNode
|
||||
class DOMElement extends DOMNode implements DOMParentNode, DOMChildNode
|
||||
{
|
||||
public function __construct(string $qualifiedName, ?string $value = null, string $namespace = "") {}
|
||||
|
||||
@@ -190,7 +194,7 @@ class DOMElement implements DOMParentNode, DOMChildNode
|
||||
public function getElementsByTagName(string $qualifiedName) {}
|
||||
|
||||
/** @return DOMNodeList */
|
||||
public function getElementsByTagNameNS(string $namespace, string $localName) {}
|
||||
public function getElementsByTagNameNS(?string $namespace, string $localName) {}
|
||||
|
||||
/** @return bool */
|
||||
public function hasAttribute(string $qualifiedName) {}
|
||||
@@ -246,7 +250,7 @@ class DOMElement implements DOMParentNode, DOMChildNode
|
||||
public function prepend(...$nodes): void {}
|
||||
}
|
||||
|
||||
class DOMDocument implements DOMParentNode
|
||||
class DOMDocument extends DOMNode implements DOMParentNode
|
||||
{
|
||||
public function __construct(string $version = "1.0", string $encoding = "") {}
|
||||
|
||||
@@ -287,7 +291,7 @@ class DOMDocument implements DOMParentNode
|
||||
public function getElementsByTagName(string $qualifiedName) {}
|
||||
|
||||
/** @return DOMNodeList */
|
||||
public function getElementsByTagNameNS(string $namespace, string $localName) {}
|
||||
public function getElementsByTagNameNS(?string $namespace, string $localName) {}
|
||||
|
||||
/** @return DOMNode|false */
|
||||
public function importNode(DOMNode $node, bool $deep = false) {}
|
||||
@@ -358,7 +362,7 @@ final class DOMException extends Exception
|
||||
{
|
||||
}
|
||||
|
||||
class DOMText
|
||||
class DOMText extends DOMCharacterData
|
||||
{
|
||||
public function __construct(string $data = "") {}
|
||||
|
||||
@@ -396,7 +400,7 @@ class DOMEntity extends DOMNode
|
||||
{
|
||||
}
|
||||
|
||||
class DOMEntityReference
|
||||
class DOMEntityReference extends DOMNode
|
||||
{
|
||||
public function __construct(string $name) {}
|
||||
}
|
||||
@@ -405,7 +409,7 @@ class DOMNotation extends DOMNode
|
||||
{
|
||||
}
|
||||
|
||||
class DOMProcessingInstruction
|
||||
class DOMProcessingInstruction extends DOMNode
|
||||
{
|
||||
public function __construct(string $name, string $value = "") {}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: 7cba1a7a34cc4789871faf44fc4794a48db26e61 */
|
||||
* Stub hash: a4767d6ea60859c8897f681fb69d6f73b1f50471 */
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_dom_import_simplexml, 0, 1, DOMElement, 1)
|
||||
ZEND_ARG_TYPE_INFO(0, node, IS_OBJECT, 0)
|
||||
@@ -106,7 +106,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMImplementation_createDocumentType, 0, 0,
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMImplementation_createDocument, 0, 0, 0)
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, namespace, IS_STRING, 0, "\"\"")
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, namespace, IS_STRING, 1, "null")
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, qualifiedName, IS_STRING, 0, "\"\"")
|
||||
ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, doctype, DOMDocumentType, 1, "null")
|
||||
ZEND_END_ARG_INFO()
|
||||
@@ -184,10 +184,7 @@ ZEND_END_ARG_INFO()
|
||||
|
||||
#define arginfo_class_DOMElement_getElementsByTagName arginfo_class_DOMElement_getAttribute
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMElement_getElementsByTagNameNS, 0, 0, 2)
|
||||
ZEND_ARG_TYPE_INFO(0, namespace, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, localName, IS_STRING, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
#define arginfo_class_DOMElement_getElementsByTagNameNS arginfo_class_DOMElement_getAttributeNS
|
||||
|
||||
#define arginfo_class_DOMElement_hasAttribute arginfo_class_DOMElement_getAttribute
|
||||
|
||||
@@ -292,7 +289,7 @@ ZEND_END_ARG_INFO()
|
||||
|
||||
#define arginfo_class_DOMDocument_getElementsByTagName arginfo_class_DOMElement_getAttribute
|
||||
|
||||
#define arginfo_class_DOMDocument_getElementsByTagNameNS arginfo_class_DOMElement_getElementsByTagNameNS
|
||||
#define arginfo_class_DOMDocument_getElementsByTagNameNS arginfo_class_DOMElement_getAttributeNS
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_importNode, 0, 0, 1)
|
||||
ZEND_ARG_OBJ_INFO(0, node, DOMNode, 0)
|
||||
@@ -649,6 +646,11 @@ static const zend_function_entry class_DOMNode_methods[] = {
|
||||
};
|
||||
|
||||
|
||||
static const zend_function_entry class_DOMNameSpaceNode_methods[] = {
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
|
||||
static const zend_function_entry class_DOMImplementation_methods[] = {
|
||||
ZEND_ME(DOMImplementation, getFeature, arginfo_class_DOMImplementation_getFeature, ZEND_ACC_PUBLIC)
|
||||
ZEND_ME(DOMImplementation, hasFeature, arginfo_class_DOMImplementation_hasFeature, ZEND_ACC_PUBLIC)
|
||||
|
||||
@@ -6,6 +6,7 @@ include('skipif.inc');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
$x = new DOMImplementation();
|
||||
$doc = $x->createDocument(null, 'html');
|
||||
echo $doc->saveHTML();
|
||||
|
||||
@@ -6,13 +6,24 @@ require_once('skipif.inc');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
$doc = new DOMDocument();
|
||||
$doc->loadXML('<root xmlns:x="x"><a/><x:a/></root>');
|
||||
$list = $doc->getElementsByTagNameNS('', 'a');
|
||||
var_dump($list->length);
|
||||
$list = $doc->getElementsByTagNameNS(null, 'a');
|
||||
var_dump($list->length);
|
||||
|
||||
$elem = $doc->documentElement;
|
||||
$list = $elem->getElementsByTagNameNS('', 'a');
|
||||
var_dump($list->length);
|
||||
$list = $elem->getElementsByTagNameNS(null, 'a');
|
||||
var_dump($list->length);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
int(1)
|
||||
int(1)
|
||||
int(1)
|
||||
int(1)
|
||||
@@ -0,0 +1,11 @@
|
||||
--TEST--
|
||||
dom: DOMChildNode::remove does not work on character data
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$doc = new \DOMDocument();
|
||||
$doc->loadXML('<a><!-- foo --></a>');
|
||||
$doc->documentElement->firstChild->remove();
|
||||
echo $doc->saveXML($doc->documentElement);
|
||||
--EXPECTF--
|
||||
<a/>
|
||||
@@ -199,6 +199,7 @@ PHP_MINIT_FUNCTION(enchant)
|
||||
enchant_broker_handlers.offset = XtOffsetOf(enchant_broker, std);
|
||||
enchant_broker_handlers.free_obj = php_enchant_broker_free;
|
||||
enchant_broker_handlers.clone_obj = NULL;
|
||||
enchant_broker_handlers.compare = zend_objects_not_comparable;
|
||||
|
||||
INIT_CLASS_ENTRY(dce, "EnchantDictionary", class_EnchantDictionary_methods);
|
||||
enchant_dict_ce = zend_register_internal_class(&dce);
|
||||
@@ -211,6 +212,7 @@ PHP_MINIT_FUNCTION(enchant)
|
||||
enchant_dict_handlers.offset = XtOffsetOf(enchant_dict, std);
|
||||
enchant_dict_handlers.free_obj = php_enchant_dict_free;
|
||||
enchant_dict_handlers.clone_obj = NULL;
|
||||
enchant_dict_handlers.compare = zend_objects_not_comparable;
|
||||
|
||||
REGISTER_LONG_CONSTANT("ENCHANT_MYSPELL", PHP_ENCHANT_MYSPELL, CONST_CS | CONST_PERSISTENT | CONST_DEPRECATED);
|
||||
REGISTER_LONG_CONSTANT("ENCHANT_ISPELL", PHP_ENCHANT_ISPELL, CONST_CS | CONST_PERSISTENT | CONST_DEPRECATED);
|
||||
|
||||
@@ -68,8 +68,17 @@ final class FFI
|
||||
|
||||
namespace FFI {
|
||||
|
||||
final class CData {
|
||||
}
|
||||
|
||||
final class CType {
|
||||
public function getName() : string {}
|
||||
}
|
||||
|
||||
class Exception extends \Error {
|
||||
}
|
||||
|
||||
final class ParserException extends Exception {
|
||||
}
|
||||
|
||||
}
|
||||
+16
-1
@@ -1,5 +1,5 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: 5aeec68fea7a94cd643464acfb10bf4cfcc863da */
|
||||
* Stub hash: b01d17eaac68e56d3f2c2c2bc86d44bcc8ea7c26 */
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_cdef, 0, 0, FFI, 0)
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, code, IS_STRING, 0, "\"\"")
|
||||
@@ -125,7 +125,22 @@ static const zend_function_entry class_FFI_methods[] = {
|
||||
};
|
||||
|
||||
|
||||
static const zend_function_entry class_FFI_CData_methods[] = {
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
|
||||
static const zend_function_entry class_FFI_CType_methods[] = {
|
||||
ZEND_ME(FFI_CType, getName, arginfo_class_FFI_CType_getName, ZEND_ACC_PUBLIC)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
|
||||
static const zend_function_entry class_FFI_Exception_methods[] = {
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
|
||||
static const zend_function_entry class_FFI_ParserException_methods[] = {
|
||||
ZEND_FE_END
|
||||
};
|
||||
@@ -215,7 +215,7 @@ PHP_FUNCTION(finfo_open)
|
||||
char resolved_path[MAXPATHLEN];
|
||||
zend_error_handling zeh;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|lp", &options, &file, &file_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|lp!", &options, &file, &file_len) == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
class finfo
|
||||
{
|
||||
/** @alias finfo_open */
|
||||
public function __construct(int $flags = FILEINFO_NONE, string $magic_database = "") {}
|
||||
public function __construct(int $flags = FILEINFO_NONE, ?string $magic_database = null) {}
|
||||
|
||||
/**
|
||||
* @param resource|null $context
|
||||
@@ -29,7 +29,7 @@ class finfo
|
||||
}
|
||||
|
||||
/** @return resource|false */
|
||||
function finfo_open(int $flags = FILEINFO_NONE, string $magic_database = "") {}
|
||||
function finfo_open(int $flags = FILEINFO_NONE, ?string $magic_database = null) {}
|
||||
|
||||
/**
|
||||
* @param resource $finfo
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: be858509df27550b51d8a7a51a3629eceb6d0aa6 */
|
||||
* Stub hash: 648085986695281bd5a8fb536d5ec6c2a9f8c6e8 */
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_finfo_open, 0, 0, 0)
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "FILEINFO_NONE")
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, magic_database, IS_STRING, 0, "\"\"")
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, magic_database, IS_STRING, 1, "null")
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_finfo_close, 0, 1, _IS_BOOL, 0)
|
||||
|
||||
+21
-14
@@ -232,6 +232,7 @@ static void php_gd_object_minit_helper()
|
||||
php_gd_image_object_handlers.clone_obj = NULL;
|
||||
php_gd_image_object_handlers.free_obj = php_gd_image_object_free;
|
||||
php_gd_image_object_handlers.get_constructor = php_gd_image_object_get_constructor;
|
||||
php_gd_image_object_handlers.compare = zend_objects_not_comparable;
|
||||
php_gd_image_object_handlers.offset = XtOffsetOf(php_gd_image_object, std);
|
||||
}
|
||||
|
||||
@@ -1778,7 +1779,6 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char
|
||||
char *file = NULL;
|
||||
zend_long quality = 0, type = 0;
|
||||
gdImagePtr im;
|
||||
char *fn = NULL;
|
||||
FILE *fp;
|
||||
size_t file_len = 0;
|
||||
int argc = ZEND_NUM_ARGS();
|
||||
@@ -1786,28 +1786,35 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char
|
||||
|
||||
/* The quality parameter for gd2 stands for chunk size */
|
||||
|
||||
if (zend_parse_parameters(argc, "O|pll", &imgind, gd_image_ce, &file, &file_len, &quality, &type) == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
switch (image_type) {
|
||||
case PHP_GDIMG_TYPE_GD:
|
||||
if (zend_parse_parameters(argc, "O|p!", &imgind, gd_image_ce, &file, &file_len) == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
break;
|
||||
case PHP_GDIMG_TYPE_GD2:
|
||||
if (zend_parse_parameters(argc, "O|p!ll", &imgind, gd_image_ce, &file, &file_len, &quality, &type) == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
break;
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
}
|
||||
|
||||
im = php_gd_libgdimageptr_from_zval_p(imgind);
|
||||
|
||||
if (argc > 1) {
|
||||
fn = file;
|
||||
if (argc >= 3) {
|
||||
q = quality;
|
||||
if (argc == 4) {
|
||||
t = type;
|
||||
}
|
||||
if (argc >= 3) {
|
||||
q = quality;
|
||||
if (argc == 4) {
|
||||
t = type;
|
||||
}
|
||||
}
|
||||
|
||||
if (argc >= 2 && file_len) {
|
||||
PHP_GD_CHECK_OPEN_BASEDIR(fn, "Invalid filename");
|
||||
if (file_len) {
|
||||
PHP_GD_CHECK_OPEN_BASEDIR(file, "Invalid filename");
|
||||
|
||||
fp = VCWD_FOPEN(fn, "wb");
|
||||
fp = VCWD_FOPEN(file, "wb");
|
||||
if (!fp) {
|
||||
php_error_docref(NULL, E_WARNING, "Unable to open \"%s\" for writing", fn);
|
||||
php_error_docref(NULL, E_WARNING, "Unable to open \"%s\" for writing", file);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -124,9 +124,9 @@ function imagejpeg(GdImage $image, $file = null, int $quality = -1): bool {}
|
||||
/** @param resource|string|null $file */
|
||||
function imagewbmp(GdImage $image, $file = null, ?int $foreground_color = null): bool {}
|
||||
|
||||
function imagegd(GdImage $image, string $file = UNKNOWN): bool {}
|
||||
function imagegd(GdImage $image, ?string $file = null): bool {}
|
||||
|
||||
function imagegd2(GdImage $image, string $file = UNKNOWN, int $chunk_size = UNKNOWN, int $mode = UNKNOWN): bool {}
|
||||
function imagegd2(GdImage $image, ?string $file = null, int $chunk_size = UNKNOWN, int $mode = UNKNOWN): bool {}
|
||||
|
||||
#ifdef HAVE_GD_BMP
|
||||
/** @param resource|string|null $file */
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: 59256d0de105f1a2f5d5fc1e20f8090031b42a76 */
|
||||
* Stub hash: 63898b501cc3ae38585fe0c6f70a9f7865fbee4d */
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gd_info, 0, 0, IS_ARRAY, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
@@ -238,12 +238,12 @@ ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagegd, 0, 1, _IS_BOOL, 0)
|
||||
ZEND_ARG_OBJ_INFO(0, image, GdImage, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, file, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, file, IS_STRING, 1, "null")
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imagegd2, 0, 1, _IS_BOOL, 0)
|
||||
ZEND_ARG_OBJ_INFO(0, image, GdImage, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, file, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, file, IS_STRING, 1, "null")
|
||||
ZEND_ARG_TYPE_INFO(0, chunk_size, IS_LONG, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
@@ -8,14 +8,14 @@ class IntlDateFormatter
|
||||
* @param IntlTimeZone|DateTimeZone|string|null $timezone
|
||||
* @param IntlCalendar|int|null $calendar
|
||||
*/
|
||||
public function __construct(?string $locale, int $dateType, int $timeType, $timezone = null, $calendar = null, string $pattern = "") {}
|
||||
public function __construct(?string $locale, int $dateType, int $timeType, $timezone = null, $calendar = null, ?string $pattern = null) {}
|
||||
|
||||
/**
|
||||
* @param IntlTimeZone|DateTimeZone|string|null $timezone
|
||||
* @return IntlDateFormatter|null
|
||||
* @alias datefmt_create
|
||||
*/
|
||||
public static function create(?string $locale, int $dateType, int $timeType, $timezone = null, IntlCalendar|int|null $calendar = null, string $pattern = "") {}
|
||||
public static function create(?string $locale, int $dateType, int $timeType, $timezone = null, IntlCalendar|int|null $calendar = null, ?string $pattern = null) {}
|
||||
|
||||
/**
|
||||
* @return int|false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: 62742b5f463272f43970e98900a89d513c4fb839 */
|
||||
* Stub hash: faeef90c9c1324c6a25f0df36c7239ddc2b43ee4 */
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlDateFormatter___construct, 0, 0, 3)
|
||||
ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 1)
|
||||
@@ -7,7 +7,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlDateFormatter___construct, 0, 0, 3)
|
||||
ZEND_ARG_TYPE_INFO(0, timeType, IS_LONG, 0)
|
||||
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, timezone, "null")
|
||||
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, calendar, "null")
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pattern, IS_STRING, 0, "\"\"")
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pattern, IS_STRING, 1, "null")
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlDateFormatter_create, 0, 0, 3)
|
||||
@@ -16,7 +16,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlDateFormatter_create, 0, 0, 3)
|
||||
ZEND_ARG_TYPE_INFO(0, timeType, IS_LONG, 0)
|
||||
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, timezone, "null")
|
||||
ZEND_ARG_OBJ_TYPE_MASK(0, calendar, IntlCalendar, MAY_BE_LONG|MAY_BE_NULL, "null")
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pattern, IS_STRING, 0, "\"\"")
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pattern, IS_STRING, 1, "null")
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IntlDateFormatter_getDateType, 0, 0, 0)
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
class NumberFormatter
|
||||
{
|
||||
public function __construct(string $locale, int $style, string $pattern = "") {}
|
||||
public function __construct(string $locale, int $style, ?string $pattern = null) {}
|
||||
|
||||
/**
|
||||
* @return NumberFormatter|null
|
||||
* @alias numfmt_create
|
||||
*/
|
||||
public static function create(string $locale, int $style, string $pattern = "") {}
|
||||
public static function create(string $locale, int $style, ?string $pattern = null) {}
|
||||
|
||||
/**
|
||||
* @return string|false
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: 0f285bbaa6f4f37060eb8325956f41bd86e9dea3 */
|
||||
* Stub hash: de7625297bcdb8c7e4944a319c019ed68508ea2c */
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_NumberFormatter___construct, 0, 0, 2)
|
||||
ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, style, IS_LONG, 0)
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pattern, IS_STRING, 0, "\"\"")
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pattern, IS_STRING, 1, "null")
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
#define arginfo_class_NumberFormatter_create arginfo_class_NumberFormatter___construct
|
||||
|
||||
@@ -34,7 +34,7 @@ static int numfmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
|
||||
FORMATTER_METHOD_INIT_VARS;
|
||||
|
||||
/* Parse parameters. */
|
||||
if( zend_parse_parameters( ZEND_NUM_ARGS(), "sl|s",
|
||||
if( zend_parse_parameters( ZEND_NUM_ARGS(), "sl|s!",
|
||||
&locale, &locale_len, &style, &pattern, &pattern_len ) == FAILURE )
|
||||
{
|
||||
return FAILURE;
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
class IntlException extends Exception
|
||||
{
|
||||
}
|
||||
|
||||
/* calendar */
|
||||
|
||||
/** @param IntlTimeZone|DateTimeZone|string|null $timezone */
|
||||
@@ -154,7 +158,7 @@ function intl_error_name(int $errorCode): string {}
|
||||
/* dateformat */
|
||||
|
||||
/** @param IntlTimeZone|DateTimeZone|string|null $timezone */
|
||||
function datefmt_create(?string $locale, int $dateType, int $timeType, $timezone = null, IntlCalendar|int|null $calendar = null, string $pattern = ""): ?IntlDateFormatter {}
|
||||
function datefmt_create(?string $locale, int $dateType, int $timeType, $timezone = null, IntlCalendar|int|null $calendar = null, ?string $pattern = null): ?IntlDateFormatter {}
|
||||
|
||||
function datefmt_get_datetype(IntlDateFormatter $formatter): int|false {}
|
||||
|
||||
@@ -204,7 +208,7 @@ function datefmt_get_error_message(IntlDateFormatter $formatter): string {}
|
||||
|
||||
/* formatter */
|
||||
|
||||
function numfmt_create(string $locale, int $style, string $pattern = ""): ?NumberFormatter {}
|
||||
function numfmt_create(string $locale, int $style, ?string $pattern = null): ?NumberFormatter {}
|
||||
|
||||
function numfmt_format(NumberFormatter $formatter, int|float $num, int $type = NumberFormatter::TYPE_DEFAULT): string|false {}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: c890e3cde79ffeade4623001cc369aa734812959 */
|
||||
* Stub hash: 7c89762dffb3a8b4aae51ea823af2494e7dd25d5 */
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_intlcal_create_instance, 0, 0, IntlCalendar, 1)
|
||||
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, timezone, "null")
|
||||
@@ -282,7 +282,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_datefmt_create, 0, 3, IntlDateFor
|
||||
ZEND_ARG_TYPE_INFO(0, timeType, IS_LONG, 0)
|
||||
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, timezone, "null")
|
||||
ZEND_ARG_OBJ_TYPE_MASK(0, calendar, IntlCalendar, MAY_BE_LONG|MAY_BE_NULL, "null")
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pattern, IS_STRING, 0, "\"\"")
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pattern, IS_STRING, 1, "null")
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_datefmt_get_datetype, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
|
||||
@@ -370,7 +370,7 @@ ZEND_END_ARG_INFO()
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_numfmt_create, 0, 2, NumberFormatter, 1)
|
||||
ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, style, IS_LONG, 0)
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pattern, IS_STRING, 0, "\"\"")
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pattern, IS_STRING, 1, "null")
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_numfmt_format, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
|
||||
@@ -1165,3 +1165,8 @@ static const zend_function_entry ext_functions[] = {
|
||||
ZEND_FE(transliterator_get_error_message, arginfo_transliterator_get_error_message)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
|
||||
static const zend_function_entry class_IntlException_methods[] = {
|
||||
ZEND_FE_END
|
||||
};
|
||||
@@ -15,3 +15,7 @@ interface JsonSerializable
|
||||
/** @return mixed */
|
||||
public function jsonSerialize();
|
||||
}
|
||||
|
||||
class JsonException extends Exception
|
||||
{
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: 2d1e6c422221ec7efbbd540ee777a5ce2c639943 */
|
||||
* Stub hash: 200044f4196cd8efd1ec9a2e93d4bbb63618b3c9 */
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_json_encode, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
|
||||
ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0)
|
||||
@@ -43,3 +43,8 @@ static const zend_function_entry class_JsonSerializable_methods[] = {
|
||||
ZEND_ABSTRACT_ME_WITH_FLAGS(JsonSerializable, jsonSerialize, arginfo_class_JsonSerializable_jsonSerialize, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
|
||||
static const zend_function_entry class_JsonException_methods[] = {
|
||||
ZEND_FE_END
|
||||
};
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
class LibXMLError
|
||||
{
|
||||
}
|
||||
|
||||
/** @param resource $context */
|
||||
function libxml_set_streams_context($context): void {}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: ded229511dc2bc3912d35b8055c0fd69420baff0 */
|
||||
* Stub hash: 1cc89432b61dc1997afe96e02f82a8fd1a6fcfc4 */
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_libxml_set_streams_context, 0, 1, IS_VOID, 0)
|
||||
ZEND_ARG_INFO(0, context)
|
||||
@@ -46,3 +46,8 @@ static const zend_function_entry ext_functions[] = {
|
||||
ZEND_FE(libxml_set_external_entity_loader, arginfo_libxml_set_external_entity_loader)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
|
||||
static const zend_function_entry class_LibXMLError_methods[] = {
|
||||
ZEND_FE_END
|
||||
};
|
||||
+10
-10
@@ -256,11 +256,11 @@ class mysqli
|
||||
* @alias mysqli_ssl_set
|
||||
*/
|
||||
public function ssl_set(
|
||||
string $key,
|
||||
string $certificate,
|
||||
string $ca_certificate,
|
||||
string $ca_path,
|
||||
string $cipher_algos
|
||||
?string $key,
|
||||
?string $certificate,
|
||||
?string $ca_certificate,
|
||||
?string $ca_path,
|
||||
?string $cipher_algos
|
||||
) {}
|
||||
|
||||
/**
|
||||
@@ -750,11 +750,11 @@ function mysqli_sqlstate(mysqli $mysql): string {}
|
||||
|
||||
function mysqli_ssl_set(
|
||||
mysqli $mysql,
|
||||
string $key,
|
||||
string $certificate,
|
||||
string $ca_certificate,
|
||||
string $ca_path,
|
||||
string $cipher_algos
|
||||
?string $key,
|
||||
?string $certificate,
|
||||
?string $ca_certificate,
|
||||
?string $ca_path,
|
||||
?string $cipher_algos
|
||||
): bool {}
|
||||
|
||||
function mysqli_stat(mysqli $mysql): string|false {}
|
||||
|
||||
@@ -2157,7 +2157,7 @@ PHP_FUNCTION(mysqli_ssl_set)
|
||||
char *ssl_parm[5];
|
||||
size_t ssl_parm_len[5], i;
|
||||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Osssss", &mysql_link, mysqli_link_class_entry, &ssl_parm[0], &ssl_parm_len[0], &ssl_parm[1], &ssl_parm_len[1], &ssl_parm[2], &ssl_parm_len[2], &ssl_parm[3], &ssl_parm_len[3], &ssl_parm[4], &ssl_parm_len[4]) == FAILURE) {
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Os!s!s!s!s!", &mysql_link, mysqli_link_class_entry, &ssl_parm[0], &ssl_parm_len[0], &ssl_parm[1], &ssl_parm_len[1], &ssl_parm[2], &ssl_parm_len[2], &ssl_parm[3], &ssl_parm_len[3], &ssl_parm[4], &ssl_parm_len[4]) == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_INITIALIZED);
|
||||
|
||||
+11
-11
@@ -1,5 +1,5 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: 5a8b778eaa9efcca7d3ad8bfdbaa31d9d07b25e8 */
|
||||
* Stub hash: 36c7ee22aa4c5bb5e0174031a3defcaaadde0dbd */
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_affected_rows, 0, 1, MAY_BE_LONG|MAY_BE_STRING)
|
||||
ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0)
|
||||
@@ -386,11 +386,11 @@ ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_ssl_set, 0, 6, _IS_BOOL, 0)
|
||||
ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, certificate, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, ca_certificate, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, ca_path, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, cipher_algos, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 1)
|
||||
ZEND_ARG_TYPE_INFO(0, certificate, IS_STRING, 1)
|
||||
ZEND_ARG_TYPE_INFO(0, ca_certificate, IS_STRING, 1)
|
||||
ZEND_ARG_TYPE_INFO(0, ca_path, IS_STRING, 1)
|
||||
ZEND_ARG_TYPE_INFO(0, cipher_algos, IS_STRING, 1)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_stat, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
|
||||
@@ -549,11 +549,11 @@ ZEND_END_ARG_INFO()
|
||||
#define arginfo_class_mysqli_set_opt arginfo_class_mysqli_options
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_ssl_set, 0, 0, 5)
|
||||
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, certificate, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, ca_certificate, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, ca_path, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, cipher_algos, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 1)
|
||||
ZEND_ARG_TYPE_INFO(0, certificate, IS_STRING, 1)
|
||||
ZEND_ARG_TYPE_INFO(0, ca_certificate, IS_STRING, 1)
|
||||
ZEND_ARG_TYPE_INFO(0, ca_path, IS_STRING, 1)
|
||||
ZEND_ARG_TYPE_INFO(0, cipher_algos, IS_STRING, 1)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
#define arginfo_class_mysqli_stat arginfo_class_mysqli_character_set_name
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
--TEST--
|
||||
Bug #74779 (x() and y() truncating floats to integers)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once('skipif.inc');
|
||||
require_once('skipifconnectfailure.inc');
|
||||
if (!setlocale(LC_NUMERIC, "de_DE", "de_DE.UTF-8", "de-DE")) die('skip locale not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
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);
|
||||
}
|
||||
|
||||
if (!setlocale(LC_NUMERIC, "de_DE", "de_DE.UTF-8", "de-DE")) {
|
||||
echo "[002] Cannot set locale\n";
|
||||
}
|
||||
|
||||
if (!$link->options(MYSQLI_OPT_INT_AND_FLOAT_NATIVE, true)) {
|
||||
printf("[003] [%d] %s\n", $link->errno, $link->error);
|
||||
}
|
||||
|
||||
if (!$result = $link->query("SELECT ST_Y(Point(56.7, 53.34))")) {
|
||||
printf("[004] [%d] %s\n", $link->errno, $link->error);
|
||||
}
|
||||
|
||||
if (!$array = $result->fetch_array(MYSQLI_ASSOC)) {
|
||||
printf("[005] [%d] %s\n", $link->errno, $link->error);
|
||||
}
|
||||
|
||||
var_dump($array);
|
||||
|
||||
mysqli_close($link);
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
["ST_Y(Point(56.7, 53.34))"]=>
|
||||
float(53.34)
|
||||
}
|
||||
@@ -18,8 +18,8 @@ if (!$res = $link->query("SHOW PLUGINS"))
|
||||
|
||||
$have_pam = false;
|
||||
while ($row = $res->fetch_assoc()) {
|
||||
if (isset($row['Name']) && ('mysql_clear_password' == $row['Name'])) {
|
||||
$have_pam = true;
|
||||
if (isset($row['Name']) && in_array($row['Name'], array('pam', 'authentication_pam', 'auth_pam_compat'))) {
|
||||
$have_pam = $row['Name'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -28,12 +28,54 @@ $res->close();
|
||||
if (!$have_pam)
|
||||
die("SKIP Server PAM plugin not installed");
|
||||
|
||||
if ($have_pam == 'pam') {
|
||||
/* MariaDB - needs system variable pam_use_cleartext_plugin=ON to be set */
|
||||
if (!$res = mysqli_query($link, 'SHOW GLOBAL VARIABLES LIKE "pam_use_cleartext_plugin"'))
|
||||
die(sprintf("SKIP MariaDB probe of GLOBAL VARIABLES failed [%d] %s\n",
|
||||
mysqli_errno($link), mysqli_error($link)));
|
||||
$pam_use_cleartext_plugin = mysqli_fetch_row($res);
|
||||
mysqli_free_result($res);
|
||||
if (!$pam_use_cleartext_plugin or $pam_use_cleartext_plugin[1]!='ON')
|
||||
die("SKIP Server setting pam_use_cleartext_plugin!=ON");
|
||||
|
||||
$pam_service = file_get_contents('/etc/pam.d/mysql');
|
||||
} elseif ($have_pam == 'authentication_pam') {
|
||||
/*
|
||||
required MySQL syntax:
|
||||
https://dev.mysql.com/doc/refman/8.0/en/pam-pluggable-authentication.html#pam-pluggable-authentication-usage
|
||||
*/
|
||||
$have_pam .= " AS 'mysql-unix'";
|
||||
$pam_service = file_get_contents('/etc/pam.d/mysql-unix');
|
||||
} else {
|
||||
$pam_service = file_get_contents('/etc/pam.d/mysql');
|
||||
}
|
||||
$auth = 0;
|
||||
$account = 0;
|
||||
foreach (explode("\n", $pam_service) as $line)
|
||||
{
|
||||
if (preg_match('/^auth/', $line)) {
|
||||
$auth = 1;
|
||||
} elseif (preg_match('/^account/', $line)) {
|
||||
$account = 1;
|
||||
}
|
||||
}
|
||||
if (!$auth) {
|
||||
die("SKIP pam service file missing 'auth' directive");
|
||||
}
|
||||
if (!$account) {
|
||||
die("SKIP pam service file missing 'account' directive");
|
||||
}
|
||||
|
||||
if (!posix_getpwnam('pamtest')) {
|
||||
die("SKIP no pamtest user");
|
||||
}
|
||||
/* Password of user 'pamtest' should be set to 'pamtest' */
|
||||
|
||||
mysqli_query($link, 'DROP USER pamtest');
|
||||
mysqli_query($link, 'DROP USER pamtest@localhost');
|
||||
|
||||
if (!mysqli_query($link, 'CREATE USER pamtest@"%" IDENTIFIED WITH mysql_clear_password') ||
|
||||
!mysqli_query($link, 'CREATE USER pamtest@"localhost" IDENTIFIED WITH mysql_clear_password')) {
|
||||
if (!mysqli_query($link, "CREATE USER pamtest@'%' IDENTIFIED WITH $have_pam") ||
|
||||
!mysqli_query($link, "CREATE USER pamtest@'localhost' IDENTIFIED WITH $have_pam")) {
|
||||
printf("skip Cannot create second DB user [%d] %s", mysqli_errno($link), mysqli_error($link));
|
||||
mysqli_close($link);
|
||||
die("skip CREATE USER failed");
|
||||
@@ -87,6 +129,4 @@ max_execution_time=240
|
||||
mysqli_query($link, 'DROP USER pamtest@localhost');
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: mysqli_real_connect(): (28000/1045): Access denied for user %s
|
||||
[001] Cannot connect to the server using host=%s
|
||||
done!
|
||||
@@ -650,7 +650,11 @@ mysqlnd_pam_auth_get_auth_data(struct st_mysqlnd_authentication_plugin * self,
|
||||
if (passwd && passwd_len) {
|
||||
ret = (zend_uchar*) zend_strndup(passwd, passwd_len);
|
||||
}
|
||||
*auth_data_len = passwd_len;
|
||||
/*
|
||||
Trailing null required. bug#78680
|
||||
https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_connection_phase_authentication_methods_clear_text_password.html
|
||||
*/
|
||||
*auth_data_len = passwd_len + 1;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1204,8 +1204,9 @@ php_mysqlnd_rset_field_read(MYSQLND_CONN_DATA * conn, void * _packet)
|
||||
DBG_RETURN(PASS);
|
||||
} else if (EODATA_MARKER == *p && packet->header.size < 8) {
|
||||
/* Premature EOF. That should be COM_FIELD_LIST. But we don't support COM_FIELD_LIST anymore, thus this should not happen */
|
||||
DBG_INF("Premature EOF. That should be COM_FIELD_LIST");
|
||||
DBG_RETURN(PASS);
|
||||
DBG_ERR("Premature EOF. That should be COM_FIELD_LIST");
|
||||
php_error_docref(NULL, E_WARNING, "Premature EOF in result field metadata");
|
||||
DBG_RETURN(FAIL);
|
||||
}
|
||||
|
||||
meta = packet->metadata;
|
||||
@@ -1667,7 +1668,7 @@ php_mysqlnd_rowp_read_text_protocol_aux(MYSQLND_ROW_BUFFER * row_buffer, zval *
|
||||
zend_uchar save = *(p + len);
|
||||
/* We have to make it ASCIIZ temporarily */
|
||||
*(p + len) = '\0';
|
||||
ZVAL_DOUBLE(current_field, atof((char *) p));
|
||||
ZVAL_DOUBLE(current_field, zend_strtod((char *) p, NULL));
|
||||
*(p + len) = save;
|
||||
}
|
||||
#endif /* MYSQLND_STRING_TO_INT_CONVERSION */
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
--------------------------------------------------------------------
|
||||
The PHP License, version 3.01
|
||||
Copyright (c) 1999 - 2019 The PHP Group. All rights reserved.
|
||||
Copyright (c) 1999 - 2021 The PHP Group. All rights reserved.
|
||||
--------------------------------------------------------------------
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -212,7 +212,7 @@ static const func_info_t func_infos[] = {
|
||||
F1("base64_decode", MAY_BE_FALSE | MAY_BE_STRING),
|
||||
F1("base64_encode", MAY_BE_STRING),
|
||||
F1("password_hash", MAY_BE_STRING),
|
||||
F1("password_get_info", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
|
||||
F1("password_get_info", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY),
|
||||
F1("convert_uuencode", MAY_BE_STRING),
|
||||
F1("convert_uudecode", MAY_BE_FALSE | MAY_BE_STRING),
|
||||
F1("pow", MAY_BE_LONG | MAY_BE_DOUBLE | MAY_BE_OBJECT),
|
||||
|
||||
@@ -767,14 +767,15 @@ static inline void kill_all_lockers(struct flock *mem_usage_check)
|
||||
/* so that other process won't try to force while we are busy cleaning up */
|
||||
ZCSG(force_restart_time) = 0;
|
||||
while (mem_usage_check->l_pid > 0) {
|
||||
/* Clear previous errno, reset success and tries */
|
||||
/* Try SIGTERM first, switch to SIGKILL if not successful. */
|
||||
int signal = SIGTERM;
|
||||
errno = 0;
|
||||
success = 0;
|
||||
tries = 10;
|
||||
|
||||
while (tries--) {
|
||||
zend_accel_error(ACCEL_LOG_WARNING, "Attempting to kill locker %d", mem_usage_check->l_pid);
|
||||
if (kill(mem_usage_check->l_pid, SIGKILL)) {
|
||||
if (kill(mem_usage_check->l_pid, signal)) {
|
||||
if (errno == ESRCH) {
|
||||
/* Process died before the signal was sent */
|
||||
success = 1;
|
||||
@@ -797,6 +798,8 @@ static inline void kill_all_lockers(struct flock *mem_usage_check)
|
||||
break;
|
||||
}
|
||||
usleep(10000);
|
||||
/* If SIGTERM was not sufficient, use SIGKILL. */
|
||||
signal = SIGKILL;
|
||||
}
|
||||
if (!success) {
|
||||
/* errno is not ESRCH or we ran out of tries to kill the locker */
|
||||
|
||||
@@ -2303,7 +2303,17 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op
|
||||
break;
|
||||
}
|
||||
if (opline->result_type != IS_UNUSED) {
|
||||
res_use_info = RES_USE_INFO();
|
||||
res_use_info = -1;
|
||||
|
||||
if (opline->result_type == IS_CV) {
|
||||
zend_jit_addr res_use_addr = RES_USE_REG_ADDR();
|
||||
|
||||
if (Z_MODE(res_use_addr) != IS_REG
|
||||
|| Z_LOAD(res_use_addr)
|
||||
|| Z_STORE(res_use_addr)) {
|
||||
res_use_info = RES_USE_INFO();
|
||||
}
|
||||
}
|
||||
res_info = RES_INFO();
|
||||
res_addr = RES_REG_ADDR();
|
||||
} else {
|
||||
@@ -2354,7 +2364,17 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op
|
||||
goto jit_failure;
|
||||
}
|
||||
} else {
|
||||
res_use_info = RES_USE_INFO();
|
||||
res_use_info = -1;
|
||||
|
||||
if (opline->result_type == IS_CV) {
|
||||
zend_jit_addr res_use_addr = RES_USE_REG_ADDR();
|
||||
|
||||
if (Z_MODE(res_use_addr) != IS_REG
|
||||
|| Z_LOAD(res_use_addr)
|
||||
|| Z_STORE(res_use_addr)) {
|
||||
res_use_info = RES_USE_INFO();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!zend_jit_long_math(&dasm_state, opline,
|
||||
op1_info, OP1_RANGE(), OP1_REG_ADDR(),
|
||||
@@ -2398,7 +2418,17 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op
|
||||
goto jit_failure;
|
||||
}
|
||||
} else {
|
||||
res_use_info = RES_USE_INFO();
|
||||
res_use_info = -1;
|
||||
|
||||
if (opline->result_type == IS_CV) {
|
||||
zend_jit_addr res_use_addr = RES_USE_REG_ADDR();
|
||||
|
||||
if (Z_MODE(res_use_addr) != IS_REG
|
||||
|| Z_LOAD(res_use_addr)
|
||||
|| Z_STORE(res_use_addr)) {
|
||||
res_use_info = RES_USE_INFO();
|
||||
}
|
||||
}
|
||||
}
|
||||
res_info = RES_INFO();
|
||||
if (opline->opcode == ZEND_ADD &&
|
||||
|
||||
@@ -3878,10 +3878,15 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
|
||||
STACK_MEM_TYPE(stack, EX_VAR_TO_NUM(opline->result.var)))
|
||||
& (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE);
|
||||
#else
|
||||
res_use_info = -1;
|
||||
if (opline->result_type == IS_CV) {
|
||||
res_use_info = RES_USE_INFO();
|
||||
} else {
|
||||
res_use_info = MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE;
|
||||
zend_jit_addr res_use_addr = RES_USE_REG_ADDR();
|
||||
|
||||
if (Z_MODE(res_use_addr) != IS_REG
|
||||
|| Z_LOAD(res_use_addr)
|
||||
|| Z_STORE(res_use_addr)) {
|
||||
res_use_info = RES_USE_INFO();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
res_info = RES_INFO();
|
||||
@@ -3973,10 +3978,15 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
|
||||
STACK_MEM_TYPE(stack, EX_VAR_TO_NUM(opline->result.var)))
|
||||
& (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE);
|
||||
#else
|
||||
res_use_info = -1;
|
||||
if (opline->result_type == IS_CV) {
|
||||
res_use_info = RES_USE_INFO();
|
||||
} else {
|
||||
res_use_info = MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE;
|
||||
zend_jit_addr res_use_addr = RES_USE_REG_ADDR();
|
||||
|
||||
if (Z_MODE(res_use_addr) != IS_REG
|
||||
|| Z_LOAD(res_use_addr)
|
||||
|| Z_STORE(res_use_addr)) {
|
||||
res_use_info = RES_USE_INFO();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -4050,10 +4060,15 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
|
||||
STACK_MEM_TYPE(stack, EX_VAR_TO_NUM(opline->result.var)))
|
||||
& (MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE);
|
||||
#else
|
||||
res_use_info = -1;
|
||||
if (opline->result_type == IS_CV) {
|
||||
res_use_info = RES_USE_INFO();
|
||||
} else {
|
||||
res_use_info = MAY_BE_UNDEF|MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE;
|
||||
zend_jit_addr res_use_addr = RES_USE_REG_ADDR();
|
||||
|
||||
if (Z_MODE(res_use_addr) != IS_REG
|
||||
|| Z_LOAD(res_use_addr)
|
||||
|| Z_STORE(res_use_addr)) {
|
||||
res_use_info = RES_USE_INFO();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -7138,7 +7138,7 @@ static int zend_jit_cmp_double_common(dasm_State **Dst, const zend_op *opline, z
|
||||
break;
|
||||
case ZEND_IS_NOT_IDENTICAL:
|
||||
if (exit_addr) {
|
||||
|1:
|
||||
| jp >1
|
||||
| je &exit_addr
|
||||
|1:
|
||||
} else {
|
||||
@@ -7231,10 +7231,10 @@ static int zend_jit_cmp_double_common(dasm_State **Dst, const zend_op *opline, z
|
||||
case ZEND_IS_NOT_EQUAL:
|
||||
case ZEND_IS_NOT_IDENTICAL:
|
||||
| jp >1
|
||||
| SET_ZVAL_TYPE_INFO res_addr, IS_TRUE
|
||||
| SET_ZVAL_TYPE_INFO res_addr, IS_FALSE
|
||||
| je => target_label
|
||||
|1:
|
||||
| SET_ZVAL_TYPE_INFO res_addr, IS_FALSE
|
||||
| SET_ZVAL_TYPE_INFO res_addr, IS_TRUE
|
||||
break;
|
||||
case ZEND_IS_SMALLER:
|
||||
if (swap) {
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
--TEST--
|
||||
Bug #80742 (Opcache JIT makes some boolean logic unexpectedly be true)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function checkGroundState(float $movY, float $dy) : void{
|
||||
var_dump($movY != $dy, $movY < 0, ($movY != $dy and $movY < 0));
|
||||
var_dump("wow!");
|
||||
}
|
||||
|
||||
checkGroundState(0, 0);
|
||||
|
||||
function eq(float $a, float $b, $c, $d) {
|
||||
if ($a == $b) {
|
||||
echo 1;
|
||||
}
|
||||
if ($a == $b) {
|
||||
} else {
|
||||
echo 2;
|
||||
}
|
||||
if ($a != $b) {
|
||||
echo 3;
|
||||
}
|
||||
if ($a != $b) {
|
||||
} else {
|
||||
echo 4;
|
||||
}
|
||||
if ($a === $b) {
|
||||
echo 5;
|
||||
}
|
||||
if ($a === $b) {
|
||||
} else {
|
||||
echo 6;
|
||||
}
|
||||
if ($a !== $b) {
|
||||
echo 7;
|
||||
}
|
||||
if ($a !== $b) {
|
||||
} else {
|
||||
echo 8;
|
||||
}
|
||||
echo "\n";
|
||||
var_dump(
|
||||
$a == $b && $c,
|
||||
$a != $b && $c,
|
||||
$a === $b && $c,
|
||||
$a !== $b && $c,);
|
||||
var_dump(
|
||||
$a == $b || $d,
|
||||
$a != $b || $d,
|
||||
$a === $b || $d,
|
||||
$a !== $b || $d);
|
||||
}
|
||||
eq(3.0, 3.0, true, false);
|
||||
eq(3.0, 2.0, true, false);
|
||||
eq(3.0, NAN, true, false);
|
||||
eq(NAN, NAN, true, false);
|
||||
--EXPECT--
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
string(4) "wow!"
|
||||
1458
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
2367
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
2367
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
2367
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -0,0 +1,43 @@
|
||||
--TEST--
|
||||
Bug #80745 (JIT produces Assert failure and UNKNOWN:0 var_dumps in code involving bitshifts)
|
||||
--INI--
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
opcache.file_update_protection=0
|
||||
opcache.jit=function
|
||||
opcache.jit_buffer_size=1M
|
||||
opcache.protect_memory=1
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
final class Message
|
||||
{
|
||||
public $qr = false;
|
||||
|
||||
public $opcode = 0;
|
||||
|
||||
public $aa = false;
|
||||
}
|
||||
|
||||
echo "Starting...\n";
|
||||
|
||||
function headerToBinary(Message $message)
|
||||
{
|
||||
$flags = 0;
|
||||
$flags = ($flags << 1) | ($message->qr ? 1 : 0);
|
||||
$flags = ($flags << 4) | $message->opcode;
|
||||
var_dump($flags);
|
||||
$flags = ($flags << 1) | ($message->aa ? 1 : 0);
|
||||
}
|
||||
|
||||
headerToBinary(new Message());
|
||||
|
||||
echo "PROBLEM NOT REPRODUCED !\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
Starting...
|
||||
int(0)
|
||||
PROBLEM NOT REPRODUCED !
|
||||
|
||||
+29
-26
@@ -719,6 +719,17 @@ static inline int php_openssl_config_check_syntax(const char * section_label, co
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static char *php_openssl_conf_get_string(
|
||||
LHASH_OF(CONF_VALUE) *conf, const char *group, const char *name) {
|
||||
char *str = CONF_get_string(conf, group, name);
|
||||
if (str == NULL) {
|
||||
/* OpenSSL reports an error if a configuration value is not found.
|
||||
* However, we don't want to generate errors for optional configuration. */
|
||||
ERR_clear_error();
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
static int php_openssl_add_oid_section(struct php_x509_request * req) /* {{{ */
|
||||
{
|
||||
char * str;
|
||||
@@ -726,9 +737,8 @@ static int php_openssl_add_oid_section(struct php_x509_request * req) /* {{{ */
|
||||
CONF_VALUE * cnf;
|
||||
int i;
|
||||
|
||||
str = CONF_get_string(req->req_config, NULL, "oid_section");
|
||||
str = php_openssl_conf_get_string(req->req_config, NULL, "oid_section");
|
||||
if (str == NULL) {
|
||||
php_openssl_store_errors();
|
||||
return SUCCESS;
|
||||
}
|
||||
sktmp = CONF_get_section(req->req_config, str);
|
||||
@@ -813,10 +823,8 @@ static int php_openssl_parse_config(struct php_x509_request * req, zval * option
|
||||
}
|
||||
|
||||
/* read in the oids */
|
||||
str = CONF_get_string(req->req_config, NULL, "oid_file");
|
||||
if (str == NULL) {
|
||||
php_openssl_store_errors();
|
||||
} else if (!php_openssl_open_base_dir_chk(str)) {
|
||||
str = php_openssl_conf_get_string(req->req_config, NULL, "oid_file");
|
||||
if (str != NULL && !php_openssl_open_base_dir_chk(str)) {
|
||||
BIO *oid_bio = BIO_new_file(str, PHP_OPENSSL_BIO_MODE_R(PKCS7_BINARY));
|
||||
if (oid_bio) {
|
||||
OBJ_create_objects(oid_bio);
|
||||
@@ -828,11 +836,11 @@ static int php_openssl_parse_config(struct php_x509_request * req, zval * option
|
||||
return FAILURE;
|
||||
}
|
||||
SET_OPTIONAL_STRING_ARG("digest_alg", req->digest_name,
|
||||
CONF_get_string(req->req_config, req->section_name, "default_md"));
|
||||
php_openssl_conf_get_string(req->req_config, req->section_name, "default_md"));
|
||||
SET_OPTIONAL_STRING_ARG("x509_extensions", req->extensions_section,
|
||||
CONF_get_string(req->req_config, req->section_name, "x509_extensions"));
|
||||
php_openssl_conf_get_string(req->req_config, req->section_name, "x509_extensions"));
|
||||
SET_OPTIONAL_STRING_ARG("req_extensions", req->request_extensions_section,
|
||||
CONF_get_string(req->req_config, req->section_name, "req_extensions"));
|
||||
php_openssl_conf_get_string(req->req_config, req->section_name, "req_extensions"));
|
||||
SET_OPTIONAL_LONG_ARG("private_key_bits", req->priv_key_bits,
|
||||
CONF_get_number(req->req_config, req->section_name, "default_bits"));
|
||||
|
||||
@@ -841,11 +849,9 @@ static int php_openssl_parse_config(struct php_x509_request * req, zval * option
|
||||
if (optional_args && (item = zend_hash_str_find(Z_ARRVAL_P(optional_args), "encrypt_key", sizeof("encrypt_key")-1)) != NULL) {
|
||||
req->priv_key_encrypt = Z_TYPE_P(item) == IS_TRUE ? 1 : 0;
|
||||
} else {
|
||||
str = CONF_get_string(req->req_config, req->section_name, "encrypt_rsa_key");
|
||||
str = php_openssl_conf_get_string(req->req_config, req->section_name, "encrypt_rsa_key");
|
||||
if (str == NULL) {
|
||||
str = CONF_get_string(req->req_config, req->section_name, "encrypt_key");
|
||||
/* it is sure that there are some errors as str was NULL for encrypt_rsa_key */
|
||||
php_openssl_store_errors();
|
||||
str = php_openssl_conf_get_string(req->req_config, req->section_name, "encrypt_key");
|
||||
}
|
||||
if (str != NULL && strcmp(str, "no") == 0) {
|
||||
req->priv_key_encrypt = 0;
|
||||
@@ -873,12 +879,10 @@ static int php_openssl_parse_config(struct php_x509_request * req, zval * option
|
||||
|
||||
/* digest alg */
|
||||
if (req->digest_name == NULL) {
|
||||
req->digest_name = CONF_get_string(req->req_config, req->section_name, "default_md");
|
||||
req->digest_name = php_openssl_conf_get_string(req->req_config, req->section_name, "default_md");
|
||||
}
|
||||
if (req->digest_name != NULL) {
|
||||
req->digest = req->md_alg = EVP_get_digestbyname(req->digest_name);
|
||||
} else {
|
||||
php_openssl_store_errors();
|
||||
}
|
||||
if (req->md_alg == NULL) {
|
||||
req->md_alg = req->digest = EVP_sha1();
|
||||
@@ -900,10 +904,8 @@ static int php_openssl_parse_config(struct php_x509_request * req, zval * option
|
||||
#endif
|
||||
|
||||
/* set the string mask */
|
||||
str = CONF_get_string(req->req_config, req->section_name, "string_mask");
|
||||
if (str == NULL) {
|
||||
php_openssl_store_errors();
|
||||
} else if (!ASN1_STRING_set_default_mask_asc(str)) {
|
||||
str = php_openssl_conf_get_string(req->req_config, req->section_name, "string_mask");
|
||||
if (str != NULL && !ASN1_STRING_set_default_mask_asc(str)) {
|
||||
php_error_docref(NULL, E_WARNING, "Invalid global string mask setting %s", str);
|
||||
return FAILURE;
|
||||
}
|
||||
@@ -1114,6 +1116,7 @@ PHP_MINIT_FUNCTION(openssl)
|
||||
php_openssl_certificate_object_handlers.free_obj = php_openssl_certificate_free_obj;
|
||||
php_openssl_certificate_object_handlers.get_constructor = php_openssl_certificate_get_constructor;
|
||||
php_openssl_certificate_object_handlers.clone_obj = NULL;
|
||||
php_openssl_certificate_object_handlers.compare = zend_objects_not_comparable;
|
||||
|
||||
zend_class_entry csr_ce;
|
||||
INIT_CLASS_ENTRY(csr_ce, "OpenSSLCertificateSigningRequest", class_OpenSSLCertificateSigningRequest_methods);
|
||||
@@ -1128,6 +1131,7 @@ PHP_MINIT_FUNCTION(openssl)
|
||||
php_openssl_request_object_handlers.free_obj = php_openssl_request_free_obj;
|
||||
php_openssl_request_object_handlers.get_constructor = php_openssl_request_get_constructor;
|
||||
php_openssl_request_object_handlers.clone_obj = NULL;
|
||||
php_openssl_request_object_handlers.compare = zend_objects_not_comparable;
|
||||
|
||||
zend_class_entry key_ce;
|
||||
INIT_CLASS_ENTRY(key_ce, "OpenSSLAsymmetricKey", class_OpenSSLAsymmetricKey_methods);
|
||||
@@ -1142,6 +1146,7 @@ PHP_MINIT_FUNCTION(openssl)
|
||||
php_openssl_pkey_object_handlers.free_obj = php_openssl_pkey_free_obj;
|
||||
php_openssl_pkey_object_handlers.get_constructor = php_openssl_pkey_get_constructor;
|
||||
php_openssl_pkey_object_handlers.clone_obj = NULL;
|
||||
php_openssl_pkey_object_handlers.compare = zend_objects_not_comparable;
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
|
||||
OPENSSL_config(NULL);
|
||||
@@ -2836,9 +2841,8 @@ static int php_openssl_make_REQ(struct php_x509_request * req, X509_REQ * csr, z
|
||||
php_openssl_store_errors();
|
||||
return FAILURE;
|
||||
}
|
||||
attr_sect = CONF_get_string(req->req_config, req->section_name, "attributes");
|
||||
attr_sect = php_openssl_conf_get_string(req->req_config, req->section_name, "attributes");
|
||||
if (attr_sect == NULL) {
|
||||
php_openssl_store_errors();
|
||||
attr_sk = NULL;
|
||||
} else {
|
||||
attr_sk = CONF_get_section(req->req_config, attr_sect);
|
||||
@@ -3660,10 +3664,7 @@ static EVP_PKEY * php_openssl_generate_private_key(struct php_x509_request * req
|
||||
return NULL;
|
||||
}
|
||||
|
||||
randfile = CONF_get_string(req->req_config, req->section_name, "RANDFILE");
|
||||
if (randfile == NULL) {
|
||||
php_openssl_store_errors();
|
||||
}
|
||||
randfile = php_openssl_conf_get_string(req->req_config, req->section_name, "RANDFILE");
|
||||
php_openssl_load_rand_file(randfile, &egdsocket, &seeded);
|
||||
|
||||
if ((req->priv_key = EVP_PKEY_new()) != NULL) {
|
||||
@@ -3687,6 +3688,8 @@ static EVP_PKEY * php_openssl_generate_private_key(struct php_x509_request * req
|
||||
PHP_OPENSSL_RAND_ADD_TIME();
|
||||
if (rsaparam == NULL || !RSA_generate_key_ex(rsaparam, req->priv_key_bits, bne, NULL)) {
|
||||
php_openssl_store_errors();
|
||||
RSA_free(rsaparam);
|
||||
rsaparam = NULL;
|
||||
}
|
||||
BN_free(bne);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
--TEST--
|
||||
Bug #80747: Providing RSA key size < 512 generates key that crash PHP
|
||||
--FILE--
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("openssl")) die("skip");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$conf = array(
|
||||
'config' => __DIR__ . DIRECTORY_SEPARATOR . 'openssl.cnf',
|
||||
'private_key_bits' => 511,
|
||||
);
|
||||
var_dump(openssl_pkey_new($conf));
|
||||
while ($e = openssl_error_string()) {
|
||||
echo $e, "\n";
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
bool(false)
|
||||
error:%s:key size too small
|
||||
@@ -2,4 +2,8 @@
|
||||
|
||||
/** @generate-function-entries */
|
||||
|
||||
class PDOException extends RuntimeException
|
||||
{
|
||||
}
|
||||
|
||||
function pdo_drivers(): array {}
|
||||
@@ -1,5 +1,5 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: 5f8d0ae7732bdca8c60638021c4368f55d62826f */
|
||||
* Stub hash: 307a770b43157120de39093535ea4ee20c4524fa */
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pdo_drivers, 0, 0, IS_ARRAY, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
@@ -12,3 +12,8 @@ static const zend_function_entry ext_functions[] = {
|
||||
ZEND_FE(pdo_drivers, arginfo_pdo_drivers)
|
||||
ZEND_FE_END
|
||||
};
|
||||
|
||||
|
||||
static const zend_function_entry class_PDOException_methods[] = {
|
||||
ZEND_FE_END
|
||||
};
|
||||
+6
-3
@@ -598,7 +598,8 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
}
|
||||
}
|
||||
pgsql = (PGconn *) le->ptr;
|
||||
if (PQprotocolVersion(pgsql) >= 3 && atof(PQparameterStatus(pgsql, "server_version")) >= 7.2) {
|
||||
/* consider to use php_version_compare() here */
|
||||
if (PQprotocolVersion(pgsql) >= 3 && zend_strtod(PQparameterStatus(pgsql, "server_version"), NULL) >= 7.2) {
|
||||
pg_result = PQexec(pgsql, "RESET ALL;");
|
||||
PQclear(pg_result);
|
||||
}
|
||||
@@ -4063,14 +4064,16 @@ PHP_FUNCTION(pg_get_notify)
|
||||
if (result_type & PGSQL_NUM) {
|
||||
add_index_string(return_value, 0, pgsql_notify->relname);
|
||||
add_index_long(return_value, 1, pgsql_notify->be_pid);
|
||||
if (PQprotocolVersion(pgsql) >= 3 && atof(PQparameterStatus(pgsql, "server_version")) >= 9.0) {
|
||||
/* consider to use php_version_compare() here */
|
||||
if (PQprotocolVersion(pgsql) >= 3 && zend_strtod(PQparameterStatus(pgsql, "server_version"), NULL) >= 9.0) {
|
||||
add_index_string(return_value, 2, pgsql_notify->extra);
|
||||
}
|
||||
}
|
||||
if (result_type & PGSQL_ASSOC) {
|
||||
add_assoc_string(return_value, "message", pgsql_notify->relname);
|
||||
add_assoc_long(return_value, "pid", pgsql_notify->be_pid);
|
||||
if (PQprotocolVersion(pgsql) >= 3 && atof(PQparameterStatus(pgsql, "server_version")) >= 9.0) {
|
||||
/* consider to use php_version_compare() here */
|
||||
if (PQprotocolVersion(pgsql) >= 3 && zend_strtod(PQparameterStatus(pgsql, "server_version"), NULL) >= 9.0) {
|
||||
add_assoc_string(return_value, "payload", pgsql_notify->extra);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH PHAR 1 "2019" "The PHP Group" "User Commands"
|
||||
.TH PHAR 1 "2021" "The PHP Group" "User Commands"
|
||||
.SH NAME
|
||||
phar, phar.phar \- PHAR (PHP archive) command line tool
|
||||
.SH SYNOPSIS
|
||||
|
||||
+41
-17
@@ -2558,6 +2558,7 @@ int phar_flush(phar_archive_data *phar, char *user_stub, zend_long len, int conv
|
||||
smart_str main_metadata_str = {0};
|
||||
int free_user_stub, free_fp = 1, free_ufp = 1;
|
||||
int manifest_hack = 0;
|
||||
php_stream *shared_cfp = NULL;
|
||||
|
||||
if (phar->is_persistent) {
|
||||
if (error) {
|
||||
@@ -2835,10 +2836,13 @@ int phar_flush(phar_archive_data *phar, char *user_stub, zend_long len, int conv
|
||||
return EOF;
|
||||
}
|
||||
|
||||
/* create new file that holds the compressed version */
|
||||
/* create new file that holds the compressed versions */
|
||||
/* work around inability to specify freedom in write and strictness
|
||||
in read count */
|
||||
entry->cfp = php_stream_fopen_tmpfile();
|
||||
if (shared_cfp == NULL) {
|
||||
shared_cfp = php_stream_fopen_tmpfile();
|
||||
}
|
||||
entry->cfp = shared_cfp;
|
||||
if (!entry->cfp) {
|
||||
if (error) {
|
||||
spprintf(error, 0, "unable to create temporary file");
|
||||
@@ -2847,8 +2851,11 @@ int phar_flush(phar_archive_data *phar, char *user_stub, zend_long len, int conv
|
||||
php_stream_close(oldfile);
|
||||
}
|
||||
php_stream_close(newfile);
|
||||
return EOF;
|
||||
goto cleanup;
|
||||
}
|
||||
/* for real phars, header_offset is unused; we misuse it here to store the offset in the temp file */
|
||||
ZEND_ASSERT(entry->header_offset == 0);
|
||||
entry->header_offset = php_stream_tell(entry->cfp);
|
||||
php_stream_flush(file);
|
||||
if (-1 == phar_seek_efp(entry, 0, SEEK_SET, 0, 0)) {
|
||||
if (closeoldfile) {
|
||||
@@ -2858,7 +2865,7 @@ int phar_flush(phar_archive_data *phar, char *user_stub, zend_long len, int conv
|
||||
if (error) {
|
||||
spprintf(error, 0, "unable to seek to start of file \"%s\" while creating new phar \"%s\"", entry->filename, phar->fname);
|
||||
}
|
||||
return EOF;
|
||||
goto cleanup;
|
||||
}
|
||||
php_stream_filter_append((&entry->cfp->writefilters), filter);
|
||||
if (SUCCESS != php_stream_copy_to_stream_ex(file, entry->cfp, entry->uncompressed_filesize, NULL)) {
|
||||
@@ -2869,15 +2876,14 @@ int phar_flush(phar_archive_data *phar, char *user_stub, zend_long len, int conv
|
||||
if (error) {
|
||||
spprintf(error, 0, "unable to copy compressed file contents of file \"%s\" while creating new phar \"%s\"", entry->filename, phar->fname);
|
||||
}
|
||||
return EOF;
|
||||
goto cleanup;
|
||||
}
|
||||
php_stream_filter_flush(filter, 1);
|
||||
php_stream_flush(entry->cfp);
|
||||
php_stream_filter_remove(filter, 1);
|
||||
php_stream_seek(entry->cfp, 0, SEEK_END);
|
||||
entry->compressed_filesize = (uint32_t) php_stream_tell(entry->cfp);
|
||||
entry->compressed_filesize = ((uint32_t) php_stream_tell(entry->cfp)) - entry->header_offset;
|
||||
/* generate crc on compressed file */
|
||||
php_stream_rewind(entry->cfp);
|
||||
entry->old_flags = entry->flags;
|
||||
entry->is_modified = 1;
|
||||
global_flags |= (entry->flags & PHAR_ENT_COMPRESSION_MASK);
|
||||
@@ -2933,7 +2939,7 @@ int phar_flush(phar_archive_data *phar, char *user_stub, zend_long len, int conv
|
||||
spprintf(error, 0, "unable to write manifest header of new phar \"%s\"", phar->fname);
|
||||
}
|
||||
|
||||
return EOF;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
phar->alias_len = restore_alias_len;
|
||||
@@ -2954,7 +2960,7 @@ int phar_flush(phar_archive_data *phar, char *user_stub, zend_long len, int conv
|
||||
spprintf(error, 0, "unable to write manifest meta-data of new phar \"%s\"", phar->fname);
|
||||
}
|
||||
|
||||
return EOF;
|
||||
goto cleanup;
|
||||
}
|
||||
smart_str_free(&main_metadata_str);
|
||||
|
||||
@@ -2990,7 +2996,7 @@ int phar_flush(phar_archive_data *phar, char *user_stub, zend_long len, int conv
|
||||
spprintf(error, 0, "unable to write filename of file \"%s\" to manifest of new phar \"%s\"", entry->filename, phar->fname);
|
||||
}
|
||||
}
|
||||
return EOF;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* set the manifest meta-data:
|
||||
@@ -3024,7 +3030,7 @@ int phar_flush(phar_archive_data *phar, char *user_stub, zend_long len, int conv
|
||||
spprintf(error, 0, "unable to write temporary manifest of file \"%s\" to manifest of new phar \"%s\"", entry->filename, phar->fname);
|
||||
}
|
||||
|
||||
return EOF;
|
||||
goto cleanup;
|
||||
}
|
||||
} ZEND_HASH_FOREACH_END();
|
||||
/* Hack - see bug #65028, add padding byte to the end of the manifest */
|
||||
@@ -3040,7 +3046,7 @@ int phar_flush(phar_archive_data *phar, char *user_stub, zend_long len, int conv
|
||||
spprintf(error, 0, "unable to write manifest padding byte");
|
||||
}
|
||||
|
||||
return EOF;
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3053,7 +3059,7 @@ int phar_flush(phar_archive_data *phar, char *user_stub, zend_long len, int conv
|
||||
|
||||
if (entry->cfp) {
|
||||
file = entry->cfp;
|
||||
php_stream_rewind(file);
|
||||
php_stream_seek(file, entry->header_offset, SEEK_SET);
|
||||
} else {
|
||||
file = phar_get_efp(entry, 0);
|
||||
if (-1 == phar_seek_efp(entry, 0, SEEK_SET, 0, 0)) {
|
||||
@@ -3064,7 +3070,7 @@ int phar_flush(phar_archive_data *phar, char *user_stub, zend_long len, int conv
|
||||
if (error) {
|
||||
spprintf(error, 0, "unable to seek to start of file \"%s\" while creating new phar \"%s\"", entry->filename, phar->fname);
|
||||
}
|
||||
return EOF;
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3076,7 +3082,7 @@ int phar_flush(phar_archive_data *phar, char *user_stub, zend_long len, int conv
|
||||
if (error) {
|
||||
spprintf(error, 0, "unable to seek to start of file \"%s\" while creating new phar \"%s\"", entry->filename, phar->fname);
|
||||
}
|
||||
return EOF;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* this will have changed for all files that have either changed compression or been modified */
|
||||
@@ -3093,14 +3099,14 @@ int phar_flush(phar_archive_data *phar, char *user_stub, zend_long len, int conv
|
||||
spprintf(error, 0, "unable to write contents of file \"%s\" to new phar \"%s\"", entry->filename, phar->fname);
|
||||
}
|
||||
|
||||
return EOF;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
entry->is_modified = 0;
|
||||
|
||||
if (entry->cfp) {
|
||||
php_stream_close(entry->cfp);
|
||||
entry->cfp = NULL;
|
||||
entry->header_offset = 0;
|
||||
}
|
||||
|
||||
if (entry->fp_type == PHAR_MOD) {
|
||||
@@ -3116,6 +3122,11 @@ int phar_flush(phar_archive_data *phar, char *user_stub, zend_long len, int conv
|
||||
}
|
||||
} ZEND_HASH_FOREACH_END();
|
||||
|
||||
if (shared_cfp != NULL) {
|
||||
php_stream_close(shared_cfp);
|
||||
shared_cfp = NULL;
|
||||
}
|
||||
|
||||
/* append signature */
|
||||
if (global_flags & PHAR_HDR_SIGNATURE) {
|
||||
char sig_buf[4];
|
||||
@@ -3245,6 +3256,19 @@ int phar_flush(phar_archive_data *phar, char *user_stub, zend_long len, int conv
|
||||
return EOF;
|
||||
}
|
||||
|
||||
return EOF;
|
||||
|
||||
cleanup:
|
||||
if (shared_cfp != NULL) {
|
||||
php_stream_close(shared_cfp);
|
||||
}
|
||||
ZEND_HASH_FOREACH_PTR(&phar->manifest, entry) {
|
||||
if (entry->cfp) {
|
||||
entry->cfp = NULL;
|
||||
entry->header_offset = 0;
|
||||
}
|
||||
} ZEND_HASH_FOREACH_END();
|
||||
|
||||
return EOF;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -552,7 +552,7 @@ PHP_METHOD(Phar, webPhar)
|
||||
phar_entry_info *info = NULL;
|
||||
size_t sapi_mod_name_len = strlen(sapi_module.name);
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s!s!saf!", &alias, &alias_len, &index_php, &index_php_len, &f404, &f404_len, &mimeoverride, &rewrite_fci, &rewrite_fcc) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s!s!s!af!", &alias, &alias_len, &index_php, &index_php_len, &f404, &f404_len, &mimeoverride, &rewrite_fci, &rewrite_fcc) == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@ class Phar extends RecursiveDirectoryIterator implements Countable, ArrayAccess
|
||||
final public static function unlinkArchive(string $filename): bool {}
|
||||
|
||||
final public static function webPhar(
|
||||
?string $alias = null, ?string $index = null, string $fileNotFoundScript = "",
|
||||
?string $alias = null, ?string $index = null, ?string $fileNotFoundScript = null,
|
||||
array $mimeTypes = [], ?callable $rewrite = null): void {}
|
||||
}
|
||||
|
||||
@@ -470,7 +470,7 @@ class PharData extends RecursiveDirectoryIterator implements Countable, ArrayAcc
|
||||
|
||||
/** @implementation-alias Phar::webPhar */
|
||||
final public static function webPhar(
|
||||
?string $alias = null, ?string $index = null, string $fileNotFoundScript = "",
|
||||
?string $alias = null, ?string $index = null, ?string $fileNotFoundScript = null,
|
||||
array $mimeTypes = [], ?callable $rewrite = null): void {}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: 3575a0330ff6102461655bc84add44e8b08b585f */
|
||||
* Stub hash: a8562e63010e127aadb97134733ac328ced3c7bf */
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Phar___construct, 0, 0, 1)
|
||||
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
|
||||
@@ -204,7 +204,7 @@ ZEND_END_ARG_INFO()
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Phar_webPhar, 0, 0, IS_VOID, 0)
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, alias, IS_STRING, 1, "null")
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, index, IS_STRING, 1, "null")
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, fileNotFoundScript, IS_STRING, 0, "\"\"")
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, fileNotFoundScript, IS_STRING, 1, "null")
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mimeTypes, IS_ARRAY, 0, "[]")
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, rewrite, IS_CALLABLE, 1, "null")
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
@@ -16,6 +16,6 @@ Content-type: text/html; charset=UTF-8
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught PharException: Unknown mime type specifier used, only Phar::PHP, Phar::PHPS and a mime type string are allowed in %sfrontcontroller12.php:2
|
||||
Stack trace:
|
||||
#0 %sfrontcontroller12.php(2): Phar::webPhar('whatever', 'index.php', '', Array)
|
||||
#0 %sfrontcontroller12.php(2): Phar::webPhar('whatever', 'index.php', NULL, Array)
|
||||
#1 {main}
|
||||
thrown in %sfrontcontroller12.php on line 2
|
||||
@@ -16,6 +16,6 @@ Content-type: text/html; charset=UTF-8
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught PharException: Unknown mime type specifier used (not a string or int), only Phar::PHP, Phar::PHPS and a mime type string are allowed in %sfrontcontroller13.php:2
|
||||
Stack trace:
|
||||
#0 %sfrontcontroller13.php(2): Phar::webPhar('whatever', 'index.php', '', Array)
|
||||
#0 %sfrontcontroller13.php(2): Phar::webPhar('whatever', 'index.php', NULL, Array)
|
||||
#1 {main}
|
||||
thrown in %sfrontcontroller13.php on line 2
|
||||
@@ -15,6 +15,6 @@ files/frontcontroller16.phar
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught TypeError: Phar::webPhar(): Argument #5 ($rewrite) must be a valid callback or null, class "fail" not found in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): Phar::webPhar('test.phar', '/index.php', '', Array, Array)
|
||||
#0 %s(%d): Phar::webPhar('test.phar', '/index.php', NULL, Array, Array)
|
||||
#1 {main}
|
||||
thrown in %s on line %d
|
||||
@@ -15,6 +15,6 @@ Content-type: text/html; charset=UTF-8
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught PharException: Unknown mime type specifier used, only Phar::PHP, Phar::PHPS and a mime type string are allowed in %sfrontcontroller12.php:2
|
||||
Stack trace:
|
||||
#0 %sfrontcontroller12.php(2): Phar::webPhar('whatever', 'index.php', '', Array)
|
||||
#0 %sfrontcontroller12.php(2): Phar::webPhar('whatever', 'index.php', NULL, Array)
|
||||
#1 {main}
|
||||
thrown in %sfrontcontroller12.php on line 2
|
||||
@@ -15,6 +15,6 @@ Content-type: text/html; charset=UTF-8
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught PharException: Unknown mime type specifier used (not a string or int), only Phar::PHP, Phar::PHPS and a mime type string are allowed in %sfrontcontroller13.php:2
|
||||
Stack trace:
|
||||
#0 %sfrontcontroller13.php(2): Phar::webPhar('whatever', 'index.php', '', Array)
|
||||
#0 %sfrontcontroller13.php(2): Phar::webPhar('whatever', 'index.php', NULL, Array)
|
||||
#1 {main}
|
||||
thrown in %sfrontcontroller13.php on line 2
|
||||
@@ -14,6 +14,6 @@ files/frontcontroller16.phar
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught TypeError: Phar::webPhar(): Argument #5 ($rewrite) must be a valid callback or null, class "fail" not found in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): Phar::webPhar('test.phar', '/index.php', '', Array, Array)
|
||||
#0 %s(%d): Phar::webPhar('test.phar', '/index.php', NULL, Array, Array)
|
||||
#1 {main}
|
||||
thrown in %s on line %d
|
||||
@@ -15,6 +15,6 @@ Content-type: text/html; charset=UTF-8
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught PharException: Unknown mime type specifier used, only Phar::PHP, Phar::PHPS and a mime type string are allowed in %sfrontcontroller12.phar.php:2
|
||||
Stack trace:
|
||||
#0 %sfrontcontroller12.phar.php(2): Phar::webPhar('whatever', 'index.php', '', Array)
|
||||
#0 %sfrontcontroller12.phar.php(2): Phar::webPhar('whatever', 'index.php', NULL, Array)
|
||||
#1 {main}
|
||||
thrown in %sfrontcontroller12.phar.php on line 2
|
||||
@@ -15,6 +15,6 @@ Content-type: text/html; charset=UTF-8
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught PharException: Unknown mime type specifier used (not a string or int), only Phar::PHP, Phar::PHPS and a mime type string are allowed in %sfrontcontroller13.phar.php:2
|
||||
Stack trace:
|
||||
#0 %sfrontcontroller13.phar.php(2): Phar::webPhar('whatever', 'index.php', '', Array)
|
||||
#0 %sfrontcontroller13.phar.php(2): Phar::webPhar('whatever', 'index.php', NULL, Array)
|
||||
#1 {main}
|
||||
thrown in %sfrontcontroller13.phar.php on line 2
|
||||
@@ -17,6 +17,6 @@ Content-type: text/html; charset=UTF-8
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught PharException: Unknown mime type specifier used, only Phar::PHP, Phar::PHPS and a mime type string are allowed in %sfrontcontroller12.phar.php:2
|
||||
Stack trace:
|
||||
#0 %sfrontcontroller12.phar.php(2): Phar::webPhar('whatever', 'index.php', '', Array)
|
||||
#0 %sfrontcontroller12.phar.php(2): Phar::webPhar('whatever', 'index.php', NULL, Array)
|
||||
#1 {main}
|
||||
thrown in %sfrontcontroller12.phar.php on line 2
|
||||
@@ -17,6 +17,6 @@ Content-type: text/html; charset=UTF-8
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught PharException: Unknown mime type specifier used (not a string or int), only Phar::PHP, Phar::PHPS and a mime type string are allowed in %sfrontcontroller13.phar.php:2
|
||||
Stack trace:
|
||||
#0 %sfrontcontroller13.phar.php(2): Phar::webPhar('whatever', 'index.php', '', Array)
|
||||
#0 %sfrontcontroller13.phar.php(2): Phar::webPhar('whatever', 'index.php', NULL, Array)
|
||||
#1 {main}
|
||||
thrown in %sfrontcontroller13.phar.php on line 2
|
||||
@@ -121,6 +121,7 @@ PHP_MINIT_FUNCTION(shmop)
|
||||
shmop_object_handlers.free_obj = shmop_free_obj;
|
||||
shmop_object_handlers.get_constructor = shmop_get_constructor;
|
||||
shmop_object_handlers.clone_obj = NULL;
|
||||
shmop_object_handlers.compare = zend_objects_not_comparable;
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
+1
-1
@@ -1358,7 +1358,7 @@ PHP_FUNCTION(snmp_set_oid_output_format)
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
switch((int) a1) {
|
||||
switch (a1) {
|
||||
case NETSNMP_OID_OUTPUT_SUFFIX:
|
||||
case NETSNMP_OID_OUTPUT_MODULE:
|
||||
case NETSNMP_OID_OUTPUT_FULL:
|
||||
|
||||
+15
-14
@@ -313,6 +313,8 @@ void sdl_restore_uri_credentials(sdlCtx *ctx)
|
||||
ctx->context = NULL;
|
||||
}
|
||||
|
||||
#define SAFE_STR(a) ((a)?((const char *)a):"")
|
||||
|
||||
static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, int include)
|
||||
{
|
||||
sdlPtr tmpsdl = ctx->sdl;
|
||||
@@ -374,7 +376,7 @@ static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, int include)
|
||||
if (node_is_equal_ex(trav2, "schema", XSD_NAMESPACE)) {
|
||||
load_schema(ctx, trav2);
|
||||
} else if (is_wsdl_element(trav2) && !node_is_equal(trav2,"documentation")) {
|
||||
soap_error1(E_ERROR, "Parsing WSDL: Unexpected WSDL element <%s>", trav2->name);
|
||||
soap_error1(E_ERROR, "Parsing WSDL: Unexpected WSDL element <%s>", SAFE_STR(trav2->name));
|
||||
}
|
||||
trav2 = trav2->next;
|
||||
}
|
||||
@@ -435,7 +437,7 @@ static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, int include)
|
||||
soap_error0(E_ERROR, "Parsing WSDL: <service> has no name attribute");
|
||||
}
|
||||
} else if (!node_is_equal(trav,"documentation")) {
|
||||
soap_error1(E_ERROR, "Parsing WSDL: Unexpected WSDL element <%s>", trav->name);
|
||||
soap_error1(E_ERROR, "Parsing WSDL: Unexpected WSDL element <%s>", SAFE_STR(trav->name));
|
||||
}
|
||||
trav = trav->next;
|
||||
}
|
||||
@@ -545,7 +547,7 @@ static sdlSoapBindingFunctionHeaderPtr wsdl_soap_binding_header(sdlCtx* ctx, xml
|
||||
}
|
||||
smart_str_free(&key);
|
||||
} else if (is_wsdl_element(trav) && !node_is_equal(trav,"documentation")) {
|
||||
soap_error1(E_ERROR, "Parsing WSDL: Unexpected WSDL element <%s>", trav->name);
|
||||
soap_error1(E_ERROR, "Parsing WSDL: Unexpected WSDL element <%s>", SAFE_STR(trav->name));
|
||||
}
|
||||
trav = trav->next;
|
||||
}
|
||||
@@ -647,7 +649,7 @@ static void wsdl_soap_binding_body(sdlCtx* ctx, xmlNodePtr node, char* wsdl_soap
|
||||
}
|
||||
smart_str_free(&key);
|
||||
} else if (is_wsdl_element(trav) && !node_is_equal(trav,"documentation")) {
|
||||
soap_error1(E_ERROR, "Parsing WSDL: Unexpected WSDL element <%s>", trav->name);
|
||||
soap_error1(E_ERROR, "Parsing WSDL: Unexpected WSDL element <%s>", SAFE_STR(trav->name));
|
||||
}
|
||||
trav = trav->next;
|
||||
}
|
||||
@@ -679,14 +681,14 @@ static HashTable* wsdl_message(sdlCtx *ctx, xmlChar* message_name)
|
||||
sdlParamPtr param;
|
||||
|
||||
if (trav->ns != NULL && strcmp((char*)trav->ns->href, WSDL_NAMESPACE) != 0) {
|
||||
soap_error1(E_ERROR, "Parsing WSDL: Unexpected extensibility element <%s>", trav->name);
|
||||
soap_error1(E_ERROR, "Parsing WSDL: Unexpected extensibility element <%s>", SAFE_STR(trav->name));
|
||||
}
|
||||
if (node_is_equal(trav,"documentation")) {
|
||||
trav = trav->next;
|
||||
continue;
|
||||
}
|
||||
if (!node_is_equal(trav,"part")) {
|
||||
soap_error1(E_ERROR, "Parsing WSDL: Unexpected WSDL element <%s>", trav->name);
|
||||
soap_error1(E_ERROR, "Parsing WSDL: Unexpected WSDL element <%s>", SAFE_STR(trav->name));
|
||||
}
|
||||
part = trav;
|
||||
param = emalloc(sizeof(sdlParam));
|
||||
@@ -695,7 +697,7 @@ static HashTable* wsdl_message(sdlCtx *ctx, xmlChar* message_name)
|
||||
|
||||
name = get_attribute(part->properties, "name");
|
||||
if (name == NULL) {
|
||||
soap_error1(E_ERROR, "Parsing WSDL: No name associated with <part> '%s'", message->name);
|
||||
soap_error1(E_ERROR, "Parsing WSDL: No name associated with <part> '%s'", SAFE_STR(message->name));
|
||||
}
|
||||
|
||||
param->paramName = estrdup((char*)name->children->content);
|
||||
@@ -737,9 +739,8 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri)
|
||||
zend_hash_init(&ctx.portTypes, 0, NULL, NULL, 0);
|
||||
zend_hash_init(&ctx.services, 0, NULL, NULL, 0);
|
||||
|
||||
load_wsdl_ex(this_ptr, struri, &ctx, 0);
|
||||
zend_try {
|
||||
|
||||
load_wsdl_ex(this_ptr, struri, &ctx, 0);
|
||||
schema_pass2(&ctx);
|
||||
|
||||
n = zend_hash_num_elements(&ctx.services);
|
||||
@@ -766,7 +767,7 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri)
|
||||
continue;
|
||||
}
|
||||
if (!node_is_equal(trav,"port")) {
|
||||
soap_error1(E_ERROR, "Parsing WSDL: Unexpected WSDL element <%s>", trav->name);
|
||||
soap_error1(E_ERROR, "Parsing WSDL: Unexpected WSDL element <%s>", SAFE_STR(trav->name));
|
||||
}
|
||||
|
||||
port = trav;
|
||||
@@ -805,7 +806,7 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri)
|
||||
}
|
||||
}
|
||||
if (trav2 != address && is_wsdl_element(trav2) && !node_is_equal(trav2,"documentation")) {
|
||||
soap_error1(E_ERROR, "Parsing WSDL: Unexpected WSDL element <%s>", trav2->name);
|
||||
soap_error1(E_ERROR, "Parsing WSDL: Unexpected WSDL element <%s>", SAFE_STR(trav2->name));
|
||||
}
|
||||
trav2 = trav2->next;
|
||||
}
|
||||
@@ -907,7 +908,7 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri)
|
||||
continue;
|
||||
}
|
||||
if (!node_is_equal(trav2,"operation")) {
|
||||
soap_error1(E_ERROR, "Parsing WSDL: Unexpected WSDL element <%s>", trav2->name);
|
||||
soap_error1(E_ERROR, "Parsing WSDL: Unexpected WSDL element <%s>", SAFE_STR(trav2->name));
|
||||
}
|
||||
|
||||
operation = trav2;
|
||||
@@ -926,7 +927,7 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri)
|
||||
!node_is_equal(trav3,"output") &&
|
||||
!node_is_equal(trav3,"fault") &&
|
||||
!node_is_equal(trav3,"documentation")) {
|
||||
soap_error1(E_ERROR, "Parsing WSDL: Unexpected WSDL element <%s>", trav3->name);
|
||||
soap_error1(E_ERROR, "Parsing WSDL: Unexpected WSDL element <%s>", SAFE_STR(trav3->name));
|
||||
}
|
||||
trav3 = trav3->next;
|
||||
}
|
||||
@@ -1104,7 +1105,7 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri)
|
||||
}
|
||||
}
|
||||
} else if (is_wsdl_element(trav) && !node_is_equal(trav,"documentation")) {
|
||||
soap_error1(E_ERROR, "Parsing WSDL: Unexpected WSDL element <%s>", trav->name);
|
||||
soap_error1(E_ERROR, "Parsing WSDL: Unexpected WSDL element <%s>", SAFE_STR(trav->name));
|
||||
}
|
||||
trav = trav->next;
|
||||
}
|
||||
|
||||
+2
-2
@@ -197,7 +197,7 @@ xmlNsPtr node_find_ns(xmlNodePtr node)
|
||||
|
||||
int attr_is_equal_ex(xmlAttrPtr node, char *name, char *ns)
|
||||
{
|
||||
if (name == NULL || strcmp((char*)node->name, name) == 0) {
|
||||
if (name == NULL || ((node->name) && strcmp((char*)node->name, name) == 0)) {
|
||||
if (ns) {
|
||||
xmlNsPtr nsPtr = attr_find_ns(node);
|
||||
if (nsPtr) {
|
||||
@@ -213,7 +213,7 @@ int attr_is_equal_ex(xmlAttrPtr node, char *name, char *ns)
|
||||
|
||||
int node_is_equal_ex(xmlNodePtr node, char *name, char *ns)
|
||||
{
|
||||
if (name == NULL || strcmp((char*)node->name, name) == 0) {
|
||||
if (name == NULL || ((node->name) && strcmp((char*)node->name, name) == 0)) {
|
||||
if (ns) {
|
||||
xmlNsPtr nsPtr = node_find_ns(node);
|
||||
if (nsPtr) {
|
||||
|
||||
+5
-8
@@ -693,7 +693,7 @@ PHP_METHOD(SoapVar, __construct)
|
||||
char *stype = NULL, *ns = NULL, *name = NULL, *namens = NULL;
|
||||
size_t stype_len = 0, ns_len = 0, name_len = 0, namens_len = 0;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z!l!|ssss", &data, &type, &type_is_null, &stype, &stype_len, &ns, &ns_len, &name, &name_len, &namens, &namens_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z!l!|s!s!s!s!", &data, &type, &type_is_null, &stype, &stype_len, &ns, &ns_len, &name, &name_len, &namens, &namens_len) == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
@@ -2215,13 +2215,9 @@ static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *act
|
||||
|
||||
ZVAL_STRINGL(&func,"__doRequest",sizeof("__doRequest")-1);
|
||||
ZVAL_STRINGL(¶ms[0], buf, buf_size);
|
||||
if (location == NULL) {
|
||||
ZVAL_NULL(¶ms[1]);
|
||||
} else {
|
||||
ZVAL_STRING(¶ms[1], location);
|
||||
}
|
||||
ZVAL_STRING(¶ms[1], location);
|
||||
if (action == NULL) {
|
||||
ZVAL_NULL(¶ms[2]);
|
||||
ZVAL_EMPTY_STRING(¶ms[2]);
|
||||
} else {
|
||||
ZVAL_STRING(¶ms[2], action);
|
||||
}
|
||||
@@ -2371,6 +2367,7 @@ static void do_soap_call(zend_execute_data *execute_data,
|
||||
|
||||
if (location == NULL) {
|
||||
location = binding->location;
|
||||
ZEND_ASSERT(location);
|
||||
}
|
||||
if (binding->bindingType == BINDING_SOAP) {
|
||||
sdlSoapBindingFunctionPtr fnb = (sdlSoapBindingFunctionPtr)fn->bindingAttributes;
|
||||
@@ -2886,7 +2883,7 @@ PHP_METHOD(SoapClient, __setLocation)
|
||||
zval *tmp;
|
||||
zval *this_ptr = ZEND_THIS;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s", &location, &location_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s!", &location, &location_len) == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ class SoapFault extends Exception
|
||||
|
||||
class SoapVar
|
||||
{
|
||||
public function __construct(mixed $data, ?int $encoding, string $typeName = "", string $typeNamespace = "", string $nodeName = "", string $nodeNamespace = "") {}
|
||||
public function __construct(mixed $data, ?int $encoding, ?string $typeName = null, ?string $typeNamespace = null, ?string $nodeName = null, ?string $nodeNamespace = null) {}
|
||||
}
|
||||
|
||||
class SoapServer
|
||||
@@ -108,5 +108,5 @@ class SoapClient
|
||||
public function __setSoapHeaders($headers = null) {}
|
||||
|
||||
/** @return string|null */
|
||||
public function __setLocation(string $location = "") {}
|
||||
public function __setLocation(?string $location = null) {}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: 4f958b1c954386207619cfaefa02c96e90cc0da7 */
|
||||
* Stub hash: c0d32b2d8f3c39203b437a01dc79cd4e934dc9f7 */
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_use_soap_error_handler, 0, 0, _IS_BOOL, 0)
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enable, _IS_BOOL, 0, "true")
|
||||
@@ -37,10 +37,10 @@ ZEND_END_ARG_INFO()
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapVar___construct, 0, 0, 2)
|
||||
ZEND_ARG_TYPE_INFO(0, data, IS_MIXED, 0)
|
||||
ZEND_ARG_TYPE_INFO(0, encoding, IS_LONG, 1)
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, typeName, IS_STRING, 0, "\"\"")
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, typeNamespace, IS_STRING, 0, "\"\"")
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, nodeName, IS_STRING, 0, "\"\"")
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, nodeNamespace, IS_STRING, 0, "\"\"")
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, typeName, IS_STRING, 1, "null")
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, typeNamespace, IS_STRING, 1, "null")
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, nodeName, IS_STRING, 1, "null")
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, nodeNamespace, IS_STRING, 1, "null")
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapServer___construct, 0, 0, 1)
|
||||
@@ -131,7 +131,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapClient___setSoapHeaders, 0, 0, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapClient___setLocation, 0, 0, 0)
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, location, IS_STRING, 0, "\"\"")
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, location, IS_STRING, 1, "null")
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
Bug #80672 Null Dereference in SoapClient
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
try {
|
||||
$client = new SoapClient(__DIR__ . "/bug80672.xml");
|
||||
$query = $soap->query(array('sXML' => 'something'));
|
||||
} catch(SoapFault $e) {
|
||||
print $e->getMessage();
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
SOAP-ERROR: Parsing WSDL: Unexpected WSDL element <>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<soap:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/">
|
||||
<![CDATA[test]]>
|
||||
</soap:definitions>
|
||||
@@ -446,6 +446,7 @@ static PHP_MINIT_FUNCTION(sockets)
|
||||
socket_object_handlers.get_constructor = socket_get_constructor;
|
||||
socket_object_handlers.clone_obj = NULL;
|
||||
socket_object_handlers.get_gc = socket_get_gc;
|
||||
socket_object_handlers.compare = zend_objects_not_comparable;
|
||||
|
||||
zend_class_entry ce_address_info;
|
||||
INIT_CLASS_ENTRY(ce_address_info, "AddressInfo", class_AddressInfo_methods);
|
||||
@@ -460,6 +461,7 @@ static PHP_MINIT_FUNCTION(sockets)
|
||||
address_info_object_handlers.free_obj = address_info_free_obj;
|
||||
address_info_object_handlers.get_constructor = address_info_get_constructor;
|
||||
address_info_object_handlers.clone_obj = NULL;
|
||||
address_info_object_handlers.compare = zend_objects_not_comparable;
|
||||
|
||||
REGISTER_LONG_CONSTANT("AF_UNIX", AF_UNIX, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("AF_INET", AF_INET, CONST_CS | CONST_PERSISTENT);
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Bug #80723: Different sockets compare as equal (regression in 8.0)
|
||||
--FILE--
|
||||
<?php
|
||||
$socket_1 = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
|
||||
$socket_2 = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
|
||||
var_dump($socket_1 == $socket_1);
|
||||
var_dump($socket_2 == $socket_2);
|
||||
var_dump($socket_1 == $socket_2);
|
||||
|
||||
$vector = array(1 => $socket_1, 2 => $socket_2);
|
||||
var_dump(array_search($socket_1, $vector));
|
||||
var_dump(array_search($socket_2, $vector));
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(false)
|
||||
int(1)
|
||||
int(2)
|
||||
+2
-2
@@ -1175,7 +1175,7 @@ PHP_METHOD(ArrayObject, __construct)
|
||||
spl_array_object *intern;
|
||||
zval *array;
|
||||
zend_long ar_flags = 0;
|
||||
zend_class_entry *ce_get_iterator = spl_ce_Iterator;
|
||||
zend_class_entry *ce_get_iterator = spl_ce_ArrayIterator;
|
||||
|
||||
if (ZEND_NUM_ARGS() == 0) {
|
||||
return; /* nothing to do */
|
||||
@@ -1226,7 +1226,7 @@ PHP_METHOD(ArrayObject, setIteratorClass)
|
||||
{
|
||||
zval *object = ZEND_THIS;
|
||||
spl_array_object *intern = Z_SPLARRAY_P(object);
|
||||
zend_class_entry * ce_get_iterator = spl_ce_Iterator;
|
||||
zend_class_entry *ce_get_iterator = spl_ce_ArrayIterator;
|
||||
|
||||
ZEND_PARSE_PARAMETERS_START(1, 1)
|
||||
Z_PARAM_CLASS(ce_get_iterator)
|
||||
|
||||
Loaded 100 of 130 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user