mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-16 13:36:38 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f68c9d764 | ||
|
|
a99cddf1c6 | ||
|
|
99d2cd0a32 | ||
|
|
f6a7f18597 | ||
|
|
7335437a83 |
No files matched your search
+2
-2
@@ -24,7 +24,7 @@ environment:
|
||||
PHP_BUILD_CACHE_BASE_DIR: c:\build-cache
|
||||
PHP_BUILD_OBJ_DIR: c:\obj
|
||||
PHP_BUILD_CACHE_SDK_DIR: c:\build-cache\sdk
|
||||
PHP_BUILD_SDK_BRANCH: php-sdk-2.0.4
|
||||
PHP_BUILD_SDK_BRANCH: php-sdk-2.0.0beta2
|
||||
# ext and env setup for tests
|
||||
#MYSQL_TEST_PASSWD: Password12!
|
||||
#MYSQL_TEST_USER: root
|
||||
@@ -43,7 +43,7 @@ environment:
|
||||
services:
|
||||
# the setup scripts have to be touched, once some other db version is used
|
||||
- mysql
|
||||
- postgresql96
|
||||
- postgresql95
|
||||
|
||||
platform:
|
||||
- x64
|
||||
|
||||
@@ -1,120 +1,5 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
7 Jun 2017, PHP 7.1.6
|
||||
|
||||
- Core:
|
||||
. Fixed bug #74600 (crash (SIGSEGV) in _zend_hash_add_or_update_i).
|
||||
(Laruence)
|
||||
. Fixed bug #74546 (SIGILL in ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_CONST).
|
||||
(Laruence)
|
||||
. Fixed bug #74589 (__DIR__ wrong for unicode character). (Anatol)
|
||||
|
||||
- intl:
|
||||
. Fixed bug #74468 (wrong reflection on Collator::sortWithSortKeys). (villfa)
|
||||
|
||||
- MySQLi:
|
||||
. Fixed bug #74547 (mysqli::change_user() doesn't accept null as $database
|
||||
argument w/strict_types). (Anatol)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #74596 (SIGSEGV with opcache.revalidate_path enabled). (Laruence)
|
||||
|
||||
- phar:
|
||||
. Fixed bug #51918 (Phar::webPhar() does not handle requests sent through PUT
|
||||
and DELETE method). (Christian Weiske)
|
||||
|
||||
- Readline:
|
||||
. Fixed bug #74490 (readline() moves the cursor to the beginning of the line).
|
||||
(Anatol)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #74510 (win32/sendmail.c anchors CC header but not BCC).
|
||||
(Damian Wadley, Anatol)
|
||||
|
||||
- xmlreader:
|
||||
. Fixed bug #74457 (Wrong reflection on XMLReader::expand). (villfa)
|
||||
|
||||
11 May 2017, PHP 7.1.5
|
||||
|
||||
- Core:
|
||||
. Fixed bug #74408 (Endless loop bypassing execution time limit). (Laruence)
|
||||
. Fixed bug #74353 (Segfault when killing within bash script trap code).
|
||||
(Laruence)
|
||||
. Fixed bug #74340 (Magic function __get has different behavior in php 7.1.x).
|
||||
(Nikita)
|
||||
. Fixed bug #74188 (Null coalescing operator fails for undeclared static
|
||||
class properties). (tpunt)
|
||||
. Fixed bug #74444 (multiple catch freezes in some cases). (David Matějka)
|
||||
. Fixed bug #74410 (stream_select() is broken on Windows Nanoserver).
|
||||
(Matt Ficken)
|
||||
. Fixed bug #74337 (php-cgi.exe crash on facebook callback).
|
||||
(Anton Serbulov)
|
||||
. Patch for bug #74216 was reverted. (Anatol)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #74404 (Wrong reflection on DateTimeZone::getTransitions).
|
||||
(krakjoe)
|
||||
. Fixed bug #74080 (add constant for RFC7231 format datetime). (duncan3dc)
|
||||
|
||||
- DOM:
|
||||
. Fixed bug #74416 (Wrong reflection on DOMNode::cloneNode).
|
||||
(Remi, Fabien Villepinte)
|
||||
|
||||
- Fileinfo:
|
||||
. Fixed bug #74379 (syntax error compile error in libmagic/apprentice.c).
|
||||
(Laruence)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #74343 (compile fails on solaris 11 with system gd2 library).
|
||||
(krakjoe)
|
||||
|
||||
- MySQLi:
|
||||
. Fixed bug #74432 (mysqli_connect adding ":3306" to $host if $port parameter
|
||||
not given). (Anatol)
|
||||
|
||||
- MySQLnd:
|
||||
. Fixed bug #74376 (Invalid free of persistent results on error/connection
|
||||
loss). (Yussuf Khalil)
|
||||
|
||||
- Intl:
|
||||
. Fixed bug #65683 (Intl does not support DateTimeImmutable). (Ben Scholzen)
|
||||
. Fixed bug #74298 (IntlDateFormatter->format() doesn't return
|
||||
microseconds/fractions). (Andrew Nester)
|
||||
. Fixed bug #74433 (wrong reflection for Normalizer methods). (villfa)
|
||||
. Fixed bug #74439 (wrong reflection for Locale methods). (villfa)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #74456 (Segmentation error while running a script in CLI mode).
|
||||
(Laruence)
|
||||
. Fixed bug #74431 (foreach infinite loop). (Nikita)
|
||||
. Fixed bug #74442 (Opcached version produces a nested array). (Nikita)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #73833 (null character not allowed in openssl_pkey_get_private).
|
||||
(Jakub Zelenka)
|
||||
. Fixed bug #73711 (Segfault in openssl_pkey_new when generating DSA or DH
|
||||
key). (Jakub Zelenka)
|
||||
. Fixed bug #74341 (openssl_x509_parse fails to parse ASN.1 UTCTime without
|
||||
seconds). (Moritz Fain)
|
||||
. Fixed bug #73808 (iv length warning too restrictive for aes-128-ccm).
|
||||
(Jakub Zelenka)
|
||||
|
||||
- phar:
|
||||
. Fixed bug #74383 (phar method parameters reflection correction).
|
||||
(mhagstrand)
|
||||
|
||||
- Readline:
|
||||
. Fixed bug #74489 (readline() immediately returns false in interactive
|
||||
console mode). (Anatol)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #72071 (setcookie allows max-age to be negative). (Craig Duncan)
|
||||
. Fixed bug #74361 (Compaction in array_rand() violates COW). (Nikita)
|
||||
|
||||
- Streams:
|
||||
. Fixed bug #74429 (Remote socket URI with unique persistence identifier
|
||||
broken). (Sara)
|
||||
|
||||
13 Apr 2017, PHP 7.1.4
|
||||
|
||||
- Core:
|
||||
@@ -142,9 +27,6 @@ PHP NEWS
|
||||
- iconv:
|
||||
. Fixed bug #74230 (iconv fails to fail on surrogates). (Anatol)
|
||||
|
||||
- OCI8:
|
||||
. Fixed uninitialized data causing random crash. (Dmitry)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #74250 (OPcache compilation performance regression in PHP 5.6/7
|
||||
with huge classes). (Nikita)
|
||||
@@ -214,7 +96,6 @@ PHP NEWS
|
||||
(Andrew Nester, Nikita)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #74152 (if statement says true to a null variable). (Laruence)
|
||||
. Fixed bug #74019 (Segfault with list). (Laruence)
|
||||
|
||||
- OpenSSL:
|
||||
@@ -227,10 +108,6 @@ PHP NEWS
|
||||
- PDO_OCI:
|
||||
. Fixed bug #54379 (PDO_OCI: UTF-8 output gets truncated). (gureedo / Oracle)
|
||||
|
||||
- SQLite3:
|
||||
. Fixed bug #74413 (incorrect reflection for SQLite3::enableExceptions).
|
||||
(krakjoe)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #74005 (mail.add_x_header causes RFC-breaking lone line feed).
|
||||
(Anatol)
|
||||
|
||||
+3
-2
@@ -721,6 +721,7 @@ TSRM_API int shmget(int key, int size, int flags)
|
||||
TSRM_API void *shmat(int key, const void *shmaddr, int flags)
|
||||
{
|
||||
shm_pair *shm = shm_get(key, NULL);
|
||||
int err;
|
||||
|
||||
if (!shm->segment) {
|
||||
return (void*)-1;
|
||||
@@ -728,8 +729,8 @@ TSRM_API void *shmat(int key, const void *shmaddr, int flags)
|
||||
|
||||
shm->addr = MapViewOfFileEx(shm->segment, FILE_MAP_ALL_ACCESS, 0, 0, 0, NULL);
|
||||
|
||||
if (NULL == shm->addr) {
|
||||
int err = GetLastError();
|
||||
err = GetLastError();
|
||||
if (err) {
|
||||
SET_ERRNO_FROM_WIN32_CODE(err);
|
||||
return (void*)-1;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ Stack trace:
|
||||
#0 %sbug72101.php(8): {closure}(2, 'Parameter 1 to ...', '%s', 8, Array)
|
||||
#1 %sbug72101.php(27): PHPUnit_Framework_MockObject_Stub_ReturnCallback->invoke(Object(PHPUnit_Framework_MockObject_Invocation_Static))
|
||||
#2 %sbug72101.php(19): PHPUnit_Framework_MockObject_Matcher->invoked(Object(PHPUnit_Framework_MockObject_Invocation_Static))
|
||||
#3 %sbug72101.php(52): PHPUnit_Framework_MockObject_InvocationMocker->invoke(Object(PHPUnit_Framework_MockObject_Invocation_Static))
|
||||
#3 %sbug72101.php(51): PHPUnit_Framework_MockObject_InvocationMocker->invoke(Object(PHPUnit_Framework_MockObject_Invocation_Static))
|
||||
#4 %sbug72101.php(72): Mock_MethodCallbackByReference_7b180d26->bar(0, 0, 0)
|
||||
#5 {main}
|
||||
thrown in %sbug72101.php on line 61
|
||||
@@ -1,14 +0,0 @@
|
||||
--TEST--
|
||||
Fixes bug 74188 (undeclared static variables emit a warning with ?? operator)
|
||||
--FILE--
|
||||
<?php
|
||||
abstract class Test
|
||||
{
|
||||
public static function get()
|
||||
{
|
||||
static::$a ?? true;
|
||||
}
|
||||
}
|
||||
Test::get();
|
||||
?>
|
||||
--EXPECT--
|
||||
@@ -1,30 +0,0 @@
|
||||
--TEST--
|
||||
Bug #74340: Magic function __get has different behavior in php 7.1.x
|
||||
--FILE--
|
||||
<?php
|
||||
class Test
|
||||
{
|
||||
public function __get($var)
|
||||
{
|
||||
static $first = true;
|
||||
echo '__get '.$var.PHP_EOL;
|
||||
if ($first) {
|
||||
$first = false;
|
||||
$this->$var;
|
||||
$this->{$var.'2'};
|
||||
$this->$var;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$test = new Test;
|
||||
$test->test;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
__get test
|
||||
|
||||
Notice: Undefined property: Test::$test in %s on line %d
|
||||
__get test2
|
||||
|
||||
Notice: Undefined property: Test::$test in %s on line %d
|
||||
@@ -1,38 +0,0 @@
|
||||
--TEST--
|
||||
Bug #74408 (Endless loop bypassing execution time limit)
|
||||
--INI--
|
||||
error_reporting = E_ALL | E_DEPRECATED | E_STRICT
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
//php.ini: error_reporting = E_ALL | E_DEPRECATED | E_STRICT
|
||||
|
||||
class ErrorHandling {
|
||||
|
||||
public function error_handler($errno, $errstr, $errfile, $errline) {
|
||||
$bla = new NonExistingClass2();
|
||||
}
|
||||
|
||||
public function exception_handler(Error $e) {
|
||||
echo "Caught, exception: " . $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
set_error_handler('ErrorHandling::error_handler');
|
||||
set_exception_handler('ErrorHandling::exception_handler');
|
||||
|
||||
$blubb = new NonExistingClass();
|
||||
?>
|
||||
--EXPECTF--
|
||||
Deprecated: Non-static method ErrorHandling::error_handler() should not be called statically in %sbug74408.php on line %d
|
||||
|
||||
Deprecated: Non-static method ErrorHandling::error_handler() should not be called statically in %sbug74408.php on line %d
|
||||
|
||||
Deprecated: Non-static method ErrorHandling::error_handler() should not be called statically in Unknown on line 0
|
||||
|
||||
Fatal error: Uncaught Error: Class 'NonExistingClass2' not found in %sbug74408.php:%d
|
||||
Stack trace:
|
||||
#0 [internal function]: ErrorHandling::error_handler(8192, 'Non-static meth...', '%s', %d, Array)
|
||||
#1 %sbug74408.php(%d): set_exception_handler('ErrorHandling::...')
|
||||
#2 {main}
|
||||
thrown in %sbug74408.php on line %d
|
||||
@@ -1,11 +0,0 @@
|
||||
--TEST--
|
||||
Bug #74546 (SIGILL in ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_CONST_HANDLER())
|
||||
--FILE--
|
||||
<?php
|
||||
"000000"[0]::d;
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught Error: Class '0' not found in %sbug74546.php:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %sbug74546.php on line %d
|
||||
@@ -1,29 +0,0 @@
|
||||
--TEST--
|
||||
Bug #74606 (Segfault within try/catch/finally nesting in Generators)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function gen() {
|
||||
$array = ["foo"];
|
||||
$array[] = "bar";
|
||||
|
||||
foreach ($array as $item) {
|
||||
try {
|
||||
try {
|
||||
yield;
|
||||
} finally {
|
||||
echo "fin $item\n";
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
echo "catch\n";
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
gen()->throw(new Exception);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
fin foo
|
||||
catch
|
||||
fin bar
|
||||
@@ -1,77 +0,0 @@
|
||||
--TEST--
|
||||
Bug #74444 (multiple catch freezes in some cases)
|
||||
--FILE--
|
||||
<?php
|
||||
function foo()
|
||||
{
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
echo '';
|
||||
try {
|
||||
throw new \RuntimeException();
|
||||
} catch (\FooEx | \RuntimeException $e) {
|
||||
echo 1;
|
||||
}
|
||||
echo 2;
|
||||
}
|
||||
|
||||
foo();
|
||||
|
||||
--EXPECT--
|
||||
12
|
||||
+4
-17
@@ -4810,7 +4810,6 @@ void zend_compile_try(zend_ast *ast) /* {{{ */
|
||||
|
||||
if (!is_last_class) {
|
||||
jmp_multicatch[j] = zend_emit_jump(0);
|
||||
opline = &CG(active_op_array)->opcodes[opnum_catch];
|
||||
opline->extended_value = get_next_op_number(CG(active_op_array));
|
||||
}
|
||||
}
|
||||
@@ -6455,11 +6454,7 @@ static zend_bool zend_try_ct_eval_magic_const(zval *zv, zend_ast *ast) /* {{{ */
|
||||
{
|
||||
zend_string *filename = CG(compiled_filename);
|
||||
zend_string *dirname = zend_string_init(ZSTR_VAL(filename), ZSTR_LEN(filename), 0);
|
||||
#ifdef ZEND_WIN32
|
||||
php_win32_ioutil_dirname(ZSTR_VAL(dirname), ZSTR_LEN(dirname));
|
||||
#else
|
||||
zend_dirname(ZSTR_VAL(dirname), ZSTR_LEN(dirname));
|
||||
#endif
|
||||
|
||||
if (strcmp(ZSTR_VAL(dirname), ".") == 0) {
|
||||
dirname = zend_string_extend(dirname, MAXPATHLEN, 0);
|
||||
@@ -7374,11 +7369,8 @@ void zend_compile_class_const(znode *result, zend_ast *ast) /* {{{ */
|
||||
return;
|
||||
}
|
||||
|
||||
zend_eval_const_expr(&ast->child[0]);
|
||||
zend_eval_const_expr(&ast->child[1]);
|
||||
|
||||
class_ast = ast->child[0];
|
||||
const_ast = ast->child[1];
|
||||
zend_eval_const_expr(&class_ast);
|
||||
zend_eval_const_expr(&const_ast);
|
||||
|
||||
if (class_ast->kind == ZEND_AST_ZVAL) {
|
||||
zend_string *resolved_name;
|
||||
@@ -8018,8 +8010,6 @@ void zend_compile_expr(znode *result, zend_ast *ast) /* {{{ */
|
||||
|
||||
void zend_compile_var(znode *result, zend_ast *ast, uint32_t type) /* {{{ */
|
||||
{
|
||||
CG(zend_lineno) = zend_ast_get_lineno(ast);
|
||||
|
||||
switch (ast->kind) {
|
||||
case ZEND_AST_VAR:
|
||||
zend_compile_simple_var(result, ast, type, 0);
|
||||
@@ -8316,11 +8306,8 @@ void zend_eval_const_expr(zend_ast **ast_ptr) /* {{{ */
|
||||
break;
|
||||
}
|
||||
|
||||
zend_eval_const_expr(&ast->child[0]);
|
||||
zend_eval_const_expr(&ast->child[1]);
|
||||
|
||||
class_ast = ast->child[0];
|
||||
name_ast = ast->child[1];
|
||||
zend_eval_const_expr(&class_ast);
|
||||
zend_eval_const_expr(&name_ast);
|
||||
|
||||
if (name_ast->kind == ZEND_AST_ZVAL && zend_string_equals_literal_ci(zend_ast_get_str(name_ast), "class")) {
|
||||
zend_error_noreturn(E_COMPILE_ERROR,
|
||||
|
||||
@@ -748,15 +748,6 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
|
||||
}
|
||||
zend_error(E_DEPRECATED, "%s", error);
|
||||
efree(error);
|
||||
if (UNEXPECTED(EG(exception))) {
|
||||
if (callable_name) {
|
||||
zend_string_release(callable_name);
|
||||
}
|
||||
if (EG(current_execute_data) == &dummy_execute_data) {
|
||||
EG(current_execute_data) = dummy_execute_data.prev_execute_data;
|
||||
}
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
zend_string_release(callable_name);
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ static void zend_generator_cleanup_unfinished_execution(
|
||||
if (UNEXPECTED(generator->frozen_call_stack)) {
|
||||
zend_generator_restore_call_stack(generator);
|
||||
}
|
||||
zend_cleanup_unfinished_execution(execute_data, op_num, catch_op_num);
|
||||
zend_cleanup_unfinished_execution(execute_data, op_num, 0);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -545,7 +545,7 @@ ZEND_API uint32_t *zend_get_property_guard(zend_object *zobj, zend_string *membe
|
||||
ALLOC_HASHTABLE(guards);
|
||||
zend_hash_init(guards, 8, NULL, zend_property_guard_dtor, 0);
|
||||
/* mark pointer as "special" using low bit */
|
||||
zend_hash_add_new_ptr(guards, str,
|
||||
zend_hash_add_new_ptr(guards, member,
|
||||
(void*)(((zend_uintptr_t)&zv->u2.property_guard) | 1));
|
||||
zend_string_release(Z_STR_P(zv));
|
||||
ZVAL_ARR(zv, guards);
|
||||
|
||||
+1
-1
@@ -210,7 +210,7 @@ static void zend_signal_handler(int signo, siginfo_t *siginfo, void *context)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
} else if (p_sig.handler != SIG_IGN) {
|
||||
} else {
|
||||
if (p_sig.flags & SA_SIGINFO) {
|
||||
if (p_sig.flags & SA_RESETHAND) {
|
||||
SIGG(handlers)[signo-1].flags = 0;
|
||||
|
||||
@@ -380,7 +380,7 @@ CWD_API int php_sys_stat_ex(const char *path, zend_stat_t *buf, int lstat) /* {{
|
||||
if ((data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) {
|
||||
size_t len = strlen(path);
|
||||
|
||||
if (len >= 4 && path[len-4] == '.') {
|
||||
if (path[len-4] == '.') {
|
||||
if (_memicmp(path+len-3, "exe", 3) == 0 ||
|
||||
_memicmp(path+len-3, "com", 3) == 0 ||
|
||||
_memicmp(path+len-3, "bat", 3) == 0 ||
|
||||
|
||||
+14
-25
@@ -1692,13 +1692,9 @@ ZEND_VM_HELPER(zend_fetch_static_prop_helper, CONST|TMPVAR|CV, UNUSED|CONST|VAR,
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
FREE_OP1();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
FREE_OP1();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
|
||||
ZEND_VM_C_GOTO(fetch_static_prop_return);
|
||||
@@ -1733,31 +1729,24 @@ ZEND_VM_HELPER(zend_fetch_static_prop_helper, CONST|TMPVAR|CV, UNUSED|CONST|VAR,
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
FREE_OP1();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
FREE_OP1();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
|
||||
ZEND_VM_C_GOTO(fetch_static_prop_return);
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
if (UNEXPECTED(retval == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if (OP1_TYPE != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
FREE_OP1();
|
||||
HANDLE_EXCEPTION();
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if (OP1_TYPE != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
} else if (OP1_TYPE == IS_CONST) {
|
||||
FREE_OP1();
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (OP1_TYPE == IS_CONST && retval) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
|
||||
|
||||
+114
-213
@@ -4869,13 +4869,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
@@ -4910,31 +4906,24 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
if (UNEXPECTED(retval == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if (IS_CONST != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if (IS_CONST != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
} else if (IS_CONST == IS_CONST) {
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CONST == IS_CONST && retval) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
|
||||
@@ -6733,13 +6722,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
@@ -6774,31 +6759,24 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
if (UNEXPECTED(retval == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if (IS_CONST != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if (IS_CONST != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
} else if (IS_CONST == IS_CONST) {
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CONST == IS_CONST && retval) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
|
||||
@@ -7316,13 +7294,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
@@ -7357,31 +7331,24 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
if (UNEXPECTED(retval == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if (IS_CONST != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if (IS_CONST != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
} else if (IS_CONST == IS_CONST) {
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CONST == IS_CONST && retval) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
|
||||
@@ -37975,13 +37942,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
@@ -38016,31 +37979,24 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
if (UNEXPECTED(retval == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if (IS_CV != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if (IS_CV != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
} else if (IS_CV == IS_CONST) {
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CV == IS_CONST && retval) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
|
||||
@@ -41049,13 +41005,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
@@ -41090,31 +41042,24 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
if (UNEXPECTED(retval == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if (IS_CV != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if (IS_CV != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
} else if (IS_CV == IS_CONST) {
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CV == IS_CONST && retval) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
|
||||
@@ -42108,13 +42053,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
@@ -42149,31 +42090,24 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
if (UNEXPECTED(retval == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if (IS_CV != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if (IS_CV != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
} else if (IS_CV == IS_CONST) {
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if (IS_CV == IS_CONST && retval) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
|
||||
@@ -52478,13 +52412,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
@@ -52519,31 +52449,24 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
if (UNEXPECTED(retval == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
} else if ((IS_TMP_VAR|IS_VAR) == IS_CONST) {
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if ((IS_TMP_VAR|IS_VAR) == IS_CONST && retval) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
|
||||
@@ -53438,13 +53361,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
@@ -53479,31 +53398,24 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
if (UNEXPECTED(retval == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
} else if ((IS_TMP_VAR|IS_VAR) == IS_CONST) {
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if ((IS_TMP_VAR|IS_VAR) == IS_CONST && retval) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
|
||||
@@ -53937,13 +53849,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
@@ -53978,31 +53886,24 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_fetch_static_prop_helper_SPEC_
|
||||
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(name));
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
|
||||
goto fetch_static_prop_return;
|
||||
}
|
||||
}
|
||||
retval = zend_std_get_static_property(ce, name, type == BP_VAR_IS);
|
||||
retval = zend_std_get_static_property(ce, name, 0);
|
||||
if (UNEXPECTED(retval == NULL)) {
|
||||
if (type == BP_VAR_IS) {
|
||||
retval = &EG(uninitialized_zval);
|
||||
} else {
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
ZEND_ASSERT(EG(exception));
|
||||
if ((IS_TMP_VAR|IS_VAR) != IS_CONST) {
|
||||
zend_string_release(name);
|
||||
}
|
||||
} else if ((IS_TMP_VAR|IS_VAR) == IS_CONST) {
|
||||
zval_ptr_dtor_nogc(free_op1);
|
||||
HANDLE_EXCEPTION();
|
||||
}
|
||||
if ((IS_TMP_VAR|IS_VAR) == IS_CONST && retval) {
|
||||
CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, retval);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ set STABILITY=staging
|
||||
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%BRANCH%-%PHP_SDK_VC%-%PHP_SDK_ARCH%
|
||||
rem SDK is cached, deps info is cached as well
|
||||
echo Updating dependencies in %DEPS_DIR%
|
||||
call phpsdk_deps --update --no-backup --branch %BRANCH% --stability %STABILITY% --deps %DEPS_DIR%
|
||||
call phpsdk_deps --update --branch %BRANCH% --stability %STABILITY% --deps %DEPS_DIR%
|
||||
if %errorlevel% neq 0 exit /b 3
|
||||
|
||||
call buildconf.bat --force
|
||||
|
||||
+1
-2
@@ -119,7 +119,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
|
||||
PHP_MAJOR_VERSION=7
|
||||
PHP_MINOR_VERSION=1
|
||||
PHP_RELEASE_VERSION=6
|
||||
PHP_RELEASE_VERSION=4
|
||||
PHP_EXTRA_VERSION=""
|
||||
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
|
||||
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
|
||||
@@ -494,7 +494,6 @@ limits.h \
|
||||
locale.h \
|
||||
monetary.h \
|
||||
netdb.h \
|
||||
poll.h \
|
||||
pwd.h \
|
||||
resolv.h \
|
||||
signal.h \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifdef PHP_WIN32
|
||||
#if PHP_WIN32
|
||||
#include "../../../../main/config.w32.h"
|
||||
#else
|
||||
#include <php_config.h>
|
||||
|
||||
+1
-8
@@ -345,7 +345,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_timezone_transitions_get, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, timestamp_end)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_timezone_method_transitions_get, 0, 0, 0)
|
||||
ZEND_BEGIN_ARG_INFO(arginfo_timezone_method_transitions_get, 0)
|
||||
ZEND_ARG_INFO(0, timestamp_begin)
|
||||
ZEND_ARG_INFO(0, timestamp_end)
|
||||
ZEND_END_ARG_INFO()
|
||||
@@ -775,11 +775,6 @@ PHP_RSHUTDOWN_FUNCTION(date)
|
||||
*/
|
||||
#define DATE_FORMAT_RFC1123 "D, d M Y H:i:s O"
|
||||
|
||||
/*
|
||||
* RFC7231, Section 7.1.1: http://tools.ietf.org/html/rfc7231
|
||||
*/
|
||||
#define DATE_FORMAT_RFC7231 "D, d M Y H:i:s \\G\\M\\T"
|
||||
|
||||
/*
|
||||
* RFC2822, Section 3.3: http://www.ietf.org/rfc/rfc2822.txt
|
||||
* FWS = ([*WSP CRLF] 1*WSP) / ; Folding white space
|
||||
@@ -873,7 +868,6 @@ PHP_MINIT_FUNCTION(date)
|
||||
REGISTER_STRING_CONSTANT("DATE_RFC850", DATE_FORMAT_RFC850, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_STRING_CONSTANT("DATE_RFC1036", DATE_FORMAT_RFC1036, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_STRING_CONSTANT("DATE_RFC1123", DATE_FORMAT_RFC1123, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_STRING_CONSTANT("DATE_RFC7231", DATE_FORMAT_RFC7231, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_STRING_CONSTANT("DATE_RFC2822", DATE_FORMAT_RFC2822, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_STRING_CONSTANT("DATE_RFC3339", DATE_FORMAT_RFC3339, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_STRING_CONSTANT("DATE_RFC3339_EXTENDED", DATE_FORMAT_RFC3339_EXTENDED, CONST_CS | CONST_PERSISTENT);
|
||||
@@ -2068,7 +2062,6 @@ static void date_register_classes(void) /* {{{ */
|
||||
REGISTER_DATE_CLASS_CONST_STRING("RFC850", DATE_FORMAT_RFC850);
|
||||
REGISTER_DATE_CLASS_CONST_STRING("RFC1036", DATE_FORMAT_RFC1036);
|
||||
REGISTER_DATE_CLASS_CONST_STRING("RFC1123", DATE_FORMAT_RFC1123);
|
||||
REGISTER_DATE_CLASS_CONST_STRING("RFC7231", DATE_FORMAT_RFC7231);
|
||||
REGISTER_DATE_CLASS_CONST_STRING("RFC2822", DATE_FORMAT_RFC2822);
|
||||
REGISTER_DATE_CLASS_CONST_STRING("RFC3339", DATE_FORMAT_RFC3339);
|
||||
REGISTER_DATE_CLASS_CONST_STRING("RFC3339_EXTENDED", DATE_FORMAT_RFC3339_EXTENDED);
|
||||
|
||||
@@ -156,7 +156,7 @@ array(18) {
|
||||
}
|
||||
}
|
||||
..and get names of all its class constants
|
||||
array(13) {
|
||||
array(12) {
|
||||
["ATOM"]=>
|
||||
string(13) "Y-m-d\TH:i:sP"
|
||||
["COOKIE"]=>
|
||||
@@ -171,8 +171,6 @@ array(13) {
|
||||
string(16) "D, d M y H:i:s O"
|
||||
["RFC1123"]=>
|
||||
string(16) "D, d M Y H:i:s O"
|
||||
["RFC7231"]=>
|
||||
string(21) "D, d M Y H:i:s \G\M\T"
|
||||
["RFC2822"]=>
|
||||
string(16) "D, d M Y H:i:s O"
|
||||
["RFC3339"]=>
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
--TEST--
|
||||
Bug #74080 Provide an RFC7231 date time format
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$date = mktime(17, 52, 13, 4, 30, 2016);
|
||||
var_dump(date(\DateTime::RFC7231, $date));
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(29) "Sat, 30 Apr 2016 17:52:13 GMT"
|
||||
@@ -10,12 +10,12 @@ date.timezone=UTC
|
||||
$location = timezone_location_get(new DateTimeZone("Europe/Oslo"));
|
||||
var_dump($location);
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
array(4) {
|
||||
["country_code"]=>
|
||||
string(2) "NO"
|
||||
["latitude"]=>
|
||||
float(59.9166%d)
|
||||
float(59.91666)
|
||||
["longitude"]=>
|
||||
float(10.75)
|
||||
["comments"]=>
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ ZEND_END_ARG_INFO();
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_has_child_nodes, 0, 0, 0)
|
||||
ZEND_END_ARG_INFO();
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_clone_node, 0, 0, 0)
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_clone_node, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, deep)
|
||||
ZEND_END_ARG_INFO();
|
||||
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
--TEST--
|
||||
Bug #74416 Wrong reflection on DOMNode::cloneNode
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once('skipif.inc');
|
||||
if (!extension_loaded('reflection')) die('skip reflection extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$rm = new ReflectionMethod(DOMNode::class, "cloneNode");
|
||||
printf("%d\n%d\n", $rm->getNumberOfParameters(), $rm->getNumberOfRequiredParameters());
|
||||
foreach ($rm->getParameters() as $param) {
|
||||
printf("Parameter #%d %s OPTIONAL\n", $param->getPosition(), $param->isOptional() ? "IS" : "IS NOT");
|
||||
}
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
1
|
||||
0
|
||||
Parameter #0 IS OPTIONAL
|
||||
===DONE===
|
||||
+81
-93
@@ -1,6 +1,6 @@
|
||||
diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
--- libmagic.orig/apprentice.c 2017-04-10 11:41:09.731268025 +0800
|
||||
+++ libmagic/apprentice.c 2017-04-10 11:43:17.272811417 +0800
|
||||
--- libmagic.orig/apprentice.c 2016-01-25 11:31:21.473017702 +0800
|
||||
+++ libmagic/apprentice.c 2016-01-25 11:41:58.210723599 +0800
|
||||
@@ -29,6 +29,8 @@
|
||||
* apprentice - make one pass through /etc/magic, learning its secrets.
|
||||
*/
|
||||
@@ -49,18 +49,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
|
||||
#ifndef SSIZE_MAX
|
||||
#define MAXMAGIC_SIZE ((ssize_t)0x7fffffff)
|
||||
@@ -75,6 +80,10 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+#ifndef offsetof
|
||||
+#define offsetof(STRUCTURE,FIELD) ((int)((char*)&((STRUCTURE*)0)->FIELD))
|
||||
+#endif
|
||||
+
|
||||
#ifndef MAP_FAILED
|
||||
#define MAP_FAILED (void *) -1
|
||||
#endif
|
||||
@@ -168,38 +177,7 @@
|
||||
@@ -168,38 +173,7 @@
|
||||
{ NULL, 0, NULL }
|
||||
};
|
||||
|
||||
@@ -100,7 +89,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
|
||||
struct type_tbl_s {
|
||||
const char name[16];
|
||||
@@ -281,6 +259,10 @@
|
||||
@@ -281,6 +255,10 @@
|
||||
# undef XX
|
||||
# undef XX_NULL
|
||||
|
||||
@@ -111,7 +100,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
private int
|
||||
get_type(const struct type_tbl_s *tbl, const char *l, const char **t)
|
||||
{
|
||||
@@ -405,7 +387,7 @@
|
||||
@@ -405,7 +383,7 @@
|
||||
struct mlist *ml;
|
||||
|
||||
mlp->map = idx == 0 ? map : NULL;
|
||||
@@ -120,7 +109,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
return -1;
|
||||
|
||||
ml->map = NULL;
|
||||
@@ -426,10 +408,8 @@
|
||||
@@ -426,10 +404,8 @@
|
||||
apprentice_1(struct magic_set *ms, const char *fn, int action)
|
||||
{
|
||||
struct magic_map *map;
|
||||
@@ -131,7 +120,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
|
||||
if (magicsize != FILE_MAGICSIZE) {
|
||||
file_error(ms, 0, "magic element size %lu != %lu",
|
||||
@@ -445,12 +425,13 @@
|
||||
@@ -445,12 +421,13 @@
|
||||
return apprentice_compile(ms, map, fn);
|
||||
}
|
||||
|
||||
@@ -149,7 +138,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
if (map == NULL)
|
||||
return -1;
|
||||
}
|
||||
@@ -458,7 +439,8 @@
|
||||
@@ -458,7 +435,8 @@
|
||||
for (i = 0; i < MAGIC_SETS; i++) {
|
||||
if (add_mlist(ms->mlist[i], map, i) == -1) {
|
||||
file_oomem(ms, sizeof(*ml));
|
||||
@@ -159,7 +148,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
}
|
||||
}
|
||||
|
||||
@@ -472,15 +454,6 @@
|
||||
@@ -472,15 +450,6 @@
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
@@ -175,7 +164,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
}
|
||||
|
||||
protected void
|
||||
@@ -491,10 +464,16 @@
|
||||
@@ -491,10 +460,16 @@
|
||||
return;
|
||||
for (i = 0; i < MAGIC_SETS; i++)
|
||||
mlist_free(ms->mlist[i]);
|
||||
@@ -196,7 +185,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
}
|
||||
|
||||
protected struct magic_set *
|
||||
@@ -503,7 +482,7 @@
|
||||
@@ -503,7 +478,7 @@
|
||||
struct magic_set *ms;
|
||||
size_t i, len;
|
||||
|
||||
@@ -205,7 +194,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
sizeof(struct magic_set)))) == NULL)
|
||||
return NULL;
|
||||
|
||||
@@ -515,7 +494,7 @@
|
||||
@@ -515,7 +490,7 @@
|
||||
ms->o.buf = ms->o.pbuf = NULL;
|
||||
len = (ms->c.len = 10) * sizeof(*ms->c.li);
|
||||
|
||||
@@ -214,7 +203,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
goto free;
|
||||
|
||||
ms->event_flags = 0;
|
||||
@@ -531,7 +510,7 @@
|
||||
@@ -531,7 +506,7 @@
|
||||
ms->elf_notes_max = FILE_ELF_NOTES_MAX;
|
||||
return ms;
|
||||
free:
|
||||
@@ -223,7 +212,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -540,30 +519,26 @@
|
||||
@@ -540,30 +515,26 @@
|
||||
{
|
||||
if (map == NULL)
|
||||
return;
|
||||
@@ -267,7 +256,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
return NULL;
|
||||
}
|
||||
mlist->next = mlist->prev = mlist;
|
||||
@@ -582,61 +557,12 @@
|
||||
@@ -582,61 +553,12 @@
|
||||
for (ml = mlist->next; (next = ml->next) != NULL; ml = next) {
|
||||
if (ml->map)
|
||||
apprentice_unmap(ml->map);
|
||||
@@ -330,7 +319,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
/* const char *fn: list of magic files and directories */
|
||||
protected int
|
||||
file_apprentice(struct magic_set *ms, const char *fn, int action)
|
||||
@@ -648,12 +574,28 @@
|
||||
@@ -648,12 +570,28 @@
|
||||
if (ms->mlist[0] != NULL)
|
||||
file_reset(ms);
|
||||
|
||||
@@ -360,7 +349,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
file_oomem(ms, strlen(fn));
|
||||
return -1;
|
||||
}
|
||||
@@ -666,7 +608,7 @@
|
||||
@@ -666,7 +604,7 @@
|
||||
mlist_free(ms->mlist[i]);
|
||||
ms->mlist[i] = NULL;
|
||||
}
|
||||
@@ -369,7 +358,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -683,7 +625,7 @@
|
||||
@@ -683,7 +621,7 @@
|
||||
fn = p;
|
||||
}
|
||||
|
||||
@@ -378,7 +367,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
|
||||
if (errs == -1) {
|
||||
for (i = 0; i < MAGIC_SETS; i++) {
|
||||
@@ -1062,7 +1004,7 @@
|
||||
@@ -1062,7 +1000,7 @@
|
||||
|
||||
mset[i].max += ALLOC_INCR;
|
||||
if ((mp = CAST(struct magic_entry *,
|
||||
@@ -387,7 +376,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
NULL) {
|
||||
file_oomem(ms, sizeof(*mp) * mset[i].max);
|
||||
return -1;
|
||||
@@ -1083,13 +1025,19 @@
|
||||
@@ -1083,13 +1021,19 @@
|
||||
load_1(struct magic_set *ms, int action, const char *fn, int *errs,
|
||||
struct magic_entry_set *mset)
|
||||
{
|
||||
@@ -411,7 +400,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
if (errno != ENOENT)
|
||||
file_error(ms, errno, "cannot read magic file `%s'",
|
||||
fn);
|
||||
@@ -1099,8 +1047,7 @@
|
||||
@@ -1099,8 +1043,7 @@
|
||||
|
||||
memset(&me, 0, sizeof(me));
|
||||
/* read and parse this file */
|
||||
@@ -421,7 +410,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
if (len == 0) /* null line, garbage, etc */
|
||||
continue;
|
||||
if (line[len - 1] == '\n') {
|
||||
@@ -1158,8 +1105,8 @@
|
||||
@@ -1158,8 +1101,8 @@
|
||||
}
|
||||
if (me.mp)
|
||||
(void)addentry(ms, &me, mset);
|
||||
@@ -432,7 +421,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1238,7 +1185,7 @@
|
||||
@@ -1238,7 +1181,7 @@
|
||||
mentrycount += me[i].cont_count;
|
||||
|
||||
slen = sizeof(**ma) * mentrycount;
|
||||
@@ -441,7 +430,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
file_oomem(ms, slen);
|
||||
return -1;
|
||||
}
|
||||
@@ -1260,8 +1207,8 @@
|
||||
@@ -1260,8 +1203,8 @@
|
||||
if (me == NULL)
|
||||
return;
|
||||
for (i = 0; i < nme; i++)
|
||||
@@ -452,7 +441,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
}
|
||||
|
||||
private struct magic_map *
|
||||
@@ -1270,18 +1217,19 @@
|
||||
@@ -1270,18 +1213,19 @@
|
||||
int errs = 0;
|
||||
uint32_t i, j;
|
||||
size_t files = 0, maxfiles = 0;
|
||||
@@ -477,7 +466,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
{
|
||||
file_oomem(ms, sizeof(*map));
|
||||
return NULL;
|
||||
@@ -1292,22 +1240,26 @@
|
||||
@@ -1292,22 +1236,26 @@
|
||||
(void)fprintf(stderr, "%s\n", usg_hdr);
|
||||
|
||||
/* load directory or file */
|
||||
@@ -512,7 +501,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
continue;
|
||||
}
|
||||
if (files >= maxfiles) {
|
||||
@@ -1315,23 +1267,22 @@
|
||||
@@ -1315,23 +1263,22 @@
|
||||
maxfiles = (maxfiles + 1) * 2;
|
||||
mlen = maxfiles * sizeof(*filearr);
|
||||
if ((filearr = CAST(char **,
|
||||
@@ -542,7 +531,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
} else
|
||||
load_1(ms, action, fn, &errs, mset);
|
||||
if (errs)
|
||||
@@ -1796,7 +1747,7 @@
|
||||
@@ -1796,7 +1743,7 @@
|
||||
if (me->cont_count == me->max_count) {
|
||||
struct magic *nm;
|
||||
size_t cnt = me->max_count + ALLOC_CHUNK;
|
||||
@@ -551,7 +540,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
sizeof(*nm) * cnt))) == NULL) {
|
||||
file_oomem(ms, sizeof(*nm) * cnt);
|
||||
return -1;
|
||||
@@ -1811,7 +1762,7 @@
|
||||
@@ -1811,7 +1758,7 @@
|
||||
static const size_t len = sizeof(*m) * ALLOC_CHUNK;
|
||||
if (me->mp != NULL)
|
||||
return 1;
|
||||
@@ -560,7 +549,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
file_oomem(ms, len);
|
||||
return -1;
|
||||
}
|
||||
@@ -1984,7 +1935,7 @@
|
||||
@@ -1984,7 +1931,7 @@
|
||||
m->type = get_standard_integer_type(l, &l);
|
||||
else if (*l == 's' && !isalpha((unsigned char)l[1])) {
|
||||
m->type = FILE_STRING;
|
||||
@@ -569,7 +558,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2005,7 +1956,7 @@
|
||||
@@ -2005,7 +1952,7 @@
|
||||
|
||||
m->mask_op = 0;
|
||||
if (*l == '~') {
|
||||
@@ -578,7 +567,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
m->mask_op |= FILE_OPINVERSE;
|
||||
else if (ms->flags & MAGIC_CHECK)
|
||||
file_magwarn(ms, "'~' invalid for string types");
|
||||
@@ -2014,7 +1965,7 @@
|
||||
@@ -2014,7 +1961,7 @@
|
||||
m->str_range = 0;
|
||||
m->str_flags = m->type == FILE_PSTRING ? PSTRING_1_LE : 0;
|
||||
if ((op = get_op(*l)) != -1) {
|
||||
@@ -587,7 +576,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
int r;
|
||||
|
||||
if (op != FILE_OPDIVIDE) {
|
||||
@@ -2119,11 +2070,6 @@
|
||||
@@ -2119,11 +2066,6 @@
|
||||
if (check_format(ms, m) == -1)
|
||||
return -1;
|
||||
}
|
||||
@@ -599,7 +588,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
m->mimetype[0] = '\0'; /* initialise MIME type to none */
|
||||
return 0;
|
||||
}
|
||||
@@ -2195,7 +2141,7 @@
|
||||
@@ -2195,7 +2137,7 @@
|
||||
|
||||
private int
|
||||
parse_extra(struct magic_set *ms, struct magic_entry *me, const char *line,
|
||||
@@ -608,7 +597,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
{
|
||||
size_t i;
|
||||
const char *l = line;
|
||||
@@ -2264,7 +2210,7 @@
|
||||
@@ -2264,7 +2206,7 @@
|
||||
struct magic *m = &me->mp[0];
|
||||
|
||||
return parse_extra(ms, me, line,
|
||||
@@ -617,7 +606,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
sizeof(m->mimetype), "MIME", "+-/.", 1);
|
||||
}
|
||||
|
||||
@@ -2517,14 +2463,18 @@
|
||||
@@ -2517,14 +2459,18 @@
|
||||
return -1;
|
||||
}
|
||||
if (m->type == FILE_REGEX) {
|
||||
@@ -643,7 +632,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
}
|
||||
return 0;
|
||||
case FILE_FLOAT:
|
||||
@@ -2854,68 +2804,144 @@
|
||||
@@ -2854,68 +2800,144 @@
|
||||
private struct magic_map *
|
||||
apprentice_map(struct magic_set *ms, const char *fn)
|
||||
{
|
||||
@@ -756,10 +745,9 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
+ file_error(ms, 0, "File %d.%d supports only version %d magic "
|
||||
+ "files. `%s' is version %d", FILE_VERSION_MAJOR, patchlevel,
|
||||
+ VERSIONNO, dbname, version);
|
||||
goto error;
|
||||
+ goto error;
|
||||
+ }
|
||||
|
||||
- free(dbname);
|
||||
+
|
||||
+ /* php_magic_database is a const, performing writes will segfault. This is for big-endian
|
||||
+ machines only, PPC and Sparc specifically. Consider static variable or MINIT in
|
||||
+ future. */
|
||||
@@ -792,12 +780,13 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
+ if (NULL != fn && entries != nentries + 1) {
|
||||
+ file_error(ms, 0, "Inconsistent entries in `%s' %u != %u",
|
||||
+ dbname, entries, nentries + 1);
|
||||
+ goto error;
|
||||
goto error;
|
||||
+ }
|
||||
+ if (needsbyteswap)
|
||||
+ for (i = 0; i < MAGIC_SETS; i++)
|
||||
+ byteswap(map->magic[i], map->nmagic[i]);
|
||||
+
|
||||
|
||||
- free(dbname);
|
||||
+ if (dbname) {
|
||||
+ efree(dbname);
|
||||
+ }
|
||||
@@ -817,7 +806,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -2942,7 +2968,7 @@
|
||||
@@ -2942,7 +2964,7 @@
|
||||
version = ptr[1];
|
||||
if (version != VERSIONNO) {
|
||||
file_error(ms, 0, "File %s supports only version %d magic "
|
||||
@@ -826,7 +815,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
VERSIONNO, dbname, version);
|
||||
return -1;
|
||||
}
|
||||
@@ -2983,7 +3009,6 @@
|
||||
@@ -2983,7 +3005,6 @@
|
||||
{
|
||||
static const size_t nm = sizeof(*map->nmagic) * MAGIC_SETS;
|
||||
static const size_t m = sizeof(**map->magic);
|
||||
@@ -834,7 +823,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
size_t len;
|
||||
char *dbname;
|
||||
int rv = -1;
|
||||
@@ -2992,14 +3017,18 @@
|
||||
@@ -2992,14 +3013,18 @@
|
||||
struct magic m;
|
||||
uint32_t h[2 + MAGIC_SETS];
|
||||
} hdr;
|
||||
@@ -857,7 +846,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
file_error(ms, errno, "cannot open `%s'", dbname);
|
||||
goto out;
|
||||
}
|
||||
@@ -3008,24 +3037,25 @@
|
||||
@@ -3008,24 +3033,25 @@
|
||||
hdr.h[1] = VERSIONNO;
|
||||
memcpy(hdr.h + 2, map->nmagic, nm);
|
||||
|
||||
@@ -888,7 +877,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
return rv;
|
||||
}
|
||||
|
||||
@@ -3059,16 +3089,18 @@
|
||||
@@ -3059,16 +3085,18 @@
|
||||
q++;
|
||||
/* Compatibility with old code that looked in .mime */
|
||||
if (ms->flags & MAGIC_MIME) {
|
||||
@@ -913,7 +902,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
|
||||
/* Compatibility with old code that looked in .mime */
|
||||
if (strstr(p, ".mime") != NULL)
|
||||
@@ -3158,7 +3190,7 @@
|
||||
@@ -3158,7 +3186,7 @@
|
||||
m->offset = swap4((uint32_t)m->offset);
|
||||
m->in_offset = swap4((uint32_t)m->in_offset);
|
||||
m->lineno = swap4((uint32_t)m->lineno);
|
||||
@@ -923,8 +912,8 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
|
||||
m->str_flags = swap4(m->str_flags);
|
||||
}
|
||||
diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c
|
||||
--- libmagic.orig/ascmagic.c 2017-04-10 11:41:09.737268025 +0800
|
||||
+++ libmagic/ascmagic.c 2017-04-10 11:41:14.411268021 +0800
|
||||
--- libmagic.orig/ascmagic.c 2016-01-25 11:31:21.495017704 +0800
|
||||
+++ libmagic/ascmagic.c 2016-01-25 11:31:32.676017695 +0800
|
||||
@@ -139,7 +139,7 @@
|
||||
/* malloc size is a conservative overestimate; could be
|
||||
improved, or at least realloced after conversion. */
|
||||
@@ -945,8 +934,8 @@ diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c
|
||||
return rv;
|
||||
}
|
||||
diff -u libmagic.orig/cdf.c libmagic/cdf.c
|
||||
--- libmagic.orig/cdf.c 2017-04-10 11:41:09.731268025 +0800
|
||||
+++ libmagic/cdf.c 2017-04-10 11:41:14.411268021 +0800
|
||||
--- libmagic.orig/cdf.c 2016-01-25 11:31:21.472017703 +0800
|
||||
+++ libmagic/cdf.c 2016-01-25 11:31:32.676017695 +0800
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "file.h"
|
||||
|
||||
@@ -1112,8 +1101,8 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c
|
||||
#ifdef CDF_DEBUG
|
||||
else
|
||||
diff -u libmagic.orig/cdf.h libmagic/cdf.h
|
||||
--- libmagic.orig/cdf.h 2017-04-10 11:41:09.737268025 +0800
|
||||
+++ libmagic/cdf.h 2017-04-10 11:41:14.412268021 +0800
|
||||
--- libmagic.orig/cdf.h 2016-01-25 11:31:21.493017704 +0800
|
||||
+++ libmagic/cdf.h 2016-01-25 11:31:32.676017695 +0800
|
||||
@@ -35,10 +35,12 @@
|
||||
#ifndef _H_CDF_
|
||||
#define _H_CDF_
|
||||
@@ -1142,8 +1131,8 @@ diff -u libmagic.orig/cdf.h libmagic/cdf.h
|
||||
void cdf_swap_header(cdf_header_t *);
|
||||
void cdf_unpack_header(cdf_header_t *, char *);
|
||||
diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c
|
||||
--- libmagic.orig/cdf_time.c 2017-04-10 11:41:09.737268025 +0800
|
||||
+++ libmagic/cdf_time.c 2017-04-10 11:41:14.412268021 +0800
|
||||
--- libmagic.orig/cdf_time.c 2016-01-25 11:31:21.494017704 +0800
|
||||
+++ libmagic/cdf_time.c 2016-01-25 11:31:32.676017695 +0800
|
||||
@@ -96,7 +96,7 @@
|
||||
}
|
||||
|
||||
@@ -1193,8 +1182,8 @@ diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c
|
||||
static const cdf_timestamp_t tst = 0x01A5E403C2D59C00ULL;
|
||||
static const char *ref = "Sat Apr 23 01:30:00 1977";
|
||||
diff -u libmagic.orig/compress.c libmagic/compress.c
|
||||
--- libmagic.orig/compress.c 2017-04-10 11:41:09.732268025 +0800
|
||||
+++ libmagic/compress.c 2017-04-10 11:41:14.412268021 +0800
|
||||
--- libmagic.orig/compress.c 2016-01-25 11:31:21.483017704 +0800
|
||||
+++ libmagic/compress.c 2016-01-25 11:31:32.676017695 +0800
|
||||
@@ -32,10 +32,11 @@
|
||||
* uncompress(method, old, n, newch) - uncompress old into new,
|
||||
* using method, return sizeof new
|
||||
@@ -1393,8 +1382,8 @@ diff -u libmagic.orig/compress.c libmagic/compress.c
|
||||
-#endif
|
||||
+#endif /* if PHP_FILEINFO_UNCOMPRESS */
|
||||
diff -u libmagic.orig/elfclass.h libmagic/elfclass.h
|
||||
--- libmagic.orig/elfclass.h 2017-04-10 11:41:09.731268025 +0800
|
||||
+++ libmagic/elfclass.h 2017-04-10 11:41:14.412268021 +0800
|
||||
--- libmagic.orig/elfclass.h 2016-01-25 11:31:21.471017705 +0800
|
||||
+++ libmagic/elfclass.h 2016-01-25 11:31:32.677017695 +0800
|
||||
@@ -41,7 +41,7 @@
|
||||
return toomany(ms, "program headers", phnum);
|
||||
flags |= FLAGS_IS_CORE;
|
||||
@@ -1423,8 +1412,8 @@ diff -u libmagic.orig/elfclass.h libmagic/elfclass.h
|
||||
fsize, elf_getu16(swap, elfhdr.e_machine),
|
||||
(int)elf_getu16(swap, elfhdr.e_shstrndx),
|
||||
diff -u libmagic.orig/file.h libmagic/file.h
|
||||
--- libmagic.orig/file.h 2017-04-10 11:41:09.731268025 +0800
|
||||
+++ libmagic/file.h 2017-04-10 11:41:14.412268021 +0800
|
||||
--- libmagic.orig/file.h 2016-01-25 11:31:21.472017703 +0800
|
||||
+++ libmagic/file.h 2016-01-25 11:31:32.677017695 +0800
|
||||
@@ -33,11 +33,9 @@
|
||||
#ifndef __file_h__
|
||||
#define __file_h__
|
||||
@@ -1644,8 +1633,8 @@ diff -u libmagic.orig/file.h libmagic/file.h
|
||||
#define __RCSID(a)
|
||||
#endif
|
||||
diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c
|
||||
--- libmagic.orig/fsmagic.c 2017-04-10 11:41:09.730268025 +0800
|
||||
+++ libmagic/fsmagic.c 2017-04-10 11:41:14.413268021 +0800
|
||||
--- libmagic.orig/fsmagic.c 2016-01-25 11:31:21.471017705 +0800
|
||||
+++ libmagic/fsmagic.c 2016-01-25 11:31:32.677017695 +0800
|
||||
@@ -63,27 +63,21 @@
|
||||
# define minor(dev) ((dev) & 0xff)
|
||||
#endif
|
||||
@@ -1996,8 +1985,8 @@ diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c
|
||||
return ret;
|
||||
}
|
||||
diff -u libmagic.orig/funcs.c libmagic/funcs.c
|
||||
--- libmagic.orig/funcs.c 2017-04-10 11:41:09.732268025 +0800
|
||||
+++ libmagic/funcs.c 2017-04-10 11:41:14.413268021 +0800
|
||||
--- libmagic.orig/funcs.c 2016-01-25 11:31:21.483017704 +0800
|
||||
+++ libmagic/funcs.c 2016-01-25 11:41:34.164723619 +0800
|
||||
@@ -31,7 +31,6 @@
|
||||
#endif /* lint */
|
||||
|
||||
@@ -2228,7 +2217,7 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
|
||||
{
|
||||
@@ -403,8 +405,8 @@
|
||||
if (level >= ms->c.len) {
|
||||
len = (ms->c.len = 20 + level) * sizeof(*ms->c.li);
|
||||
len = (ms->c.len += 20) * sizeof(*ms->c.li);
|
||||
ms->c.li = CAST(struct level_info *, (ms->c.li == NULL) ?
|
||||
- malloc(len) :
|
||||
- realloc(ms->c.li, len));
|
||||
@@ -2381,10 +2370,9 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c
|
||||
return buf;
|
||||
}
|
||||
+
|
||||
Common subdirectories: libmagic.orig/.libs and libmagic/.libs
|
||||
diff -u libmagic.orig/magic.c libmagic/magic.c
|
||||
--- libmagic.orig/magic.c 2017-04-10 11:41:09.737268025 +0800
|
||||
+++ libmagic/magic.c 2017-04-10 11:41:14.413268021 +0800
|
||||
--- libmagic.orig/magic.c 2016-01-25 11:31:21.495017704 +0800
|
||||
+++ libmagic/magic.c 2016-01-25 11:31:32.677017695 +0800
|
||||
@@ -25,11 +25,6 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
@@ -2773,8 +2761,8 @@ diff -u libmagic.orig/magic.c libmagic/magic.c
|
||||
public const char *
|
||||
magic_error(struct magic_set *ms)
|
||||
diff -u libmagic.orig/magic.h libmagic/magic.h
|
||||
--- libmagic.orig/magic.h 2017-04-10 11:41:09.731268025 +0800
|
||||
+++ libmagic/magic.h 2017-04-10 11:41:14.413268021 +0800
|
||||
--- libmagic.orig/magic.h 2016-01-25 11:31:21.471017705 +0800
|
||||
+++ libmagic/magic.h 2016-01-25 11:31:32.677017695 +0800
|
||||
@@ -88,6 +88,7 @@
|
||||
|
||||
const char *magic_getpath(const char *, int);
|
||||
@@ -2792,8 +2780,8 @@ diff -u libmagic.orig/magic.h libmagic/magic.h
|
||||
int magic_errno(magic_t);
|
||||
|
||||
diff -u libmagic.orig/patchlevel.h libmagic/patchlevel.h
|
||||
--- libmagic.orig/patchlevel.h 2017-04-10 11:41:09.731268025 +0800
|
||||
+++ libmagic/patchlevel.h 2017-04-10 11:41:14.414268021 +0800
|
||||
--- libmagic.orig/patchlevel.h 2016-01-25 11:31:21.473017702 +0800
|
||||
+++ libmagic/patchlevel.h 2016-01-25 11:31:32.678017695 +0800
|
||||
@@ -1,34 +1,43 @@
|
||||
#define FILE_VERSION_MAJOR 5
|
||||
-#define patchlevel 6
|
||||
@@ -2858,8 +2846,8 @@ diff -u libmagic.orig/patchlevel.h libmagic/patchlevel.h
|
||||
* Revision 1.69 2008/07/02 15:27:05 christos
|
||||
* welcome to 4.25
|
||||
diff -u libmagic.orig/print.c libmagic/print.c
|
||||
--- libmagic.orig/print.c 2017-04-10 11:41:09.738268025 +0800
|
||||
+++ libmagic/print.c 2017-04-10 11:41:14.414268021 +0800
|
||||
--- libmagic.orig/print.c 2016-01-25 11:31:21.495017704 +0800
|
||||
+++ libmagic/print.c 2016-01-25 11:31:32.678017695 +0800
|
||||
@@ -28,13 +28,17 @@
|
||||
/*
|
||||
* print.c - debugging printout routines
|
||||
@@ -3131,8 +3119,8 @@ diff -u libmagic.orig/print.c libmagic/print.c
|
||||
if (tm == NULL)
|
||||
goto out;
|
||||
diff -u libmagic.orig/readcdf.c libmagic/readcdf.c
|
||||
--- libmagic.orig/readcdf.c 2017-04-10 11:41:09.737268025 +0800
|
||||
+++ libmagic/readcdf.c 2017-04-10 11:41:14.414268021 +0800
|
||||
--- libmagic.orig/readcdf.c 2016-01-25 11:31:21.493017704 +0800
|
||||
+++ libmagic/readcdf.c 2016-01-25 11:31:32.678017695 +0800
|
||||
@@ -26,15 +26,21 @@
|
||||
#include "file.h"
|
||||
|
||||
@@ -3257,8 +3245,8 @@ diff -u libmagic.orig/readcdf.c libmagic/readcdf.c
|
||||
#ifdef CDF_DEBUG
|
||||
cdf_dump_catalog(&h, &scn);
|
||||
diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
|
||||
--- libmagic.orig/softmagic.c 2017-04-10 11:41:09.730268025 +0800
|
||||
+++ libmagic/softmagic.c 2017-04-10 11:41:14.414268021 +0800
|
||||
--- libmagic.orig/softmagic.c 2016-01-25 11:31:21.471017705 +0800
|
||||
+++ libmagic/softmagic.c 2016-01-25 11:44:35.541684679 +0800
|
||||
@@ -36,11 +36,19 @@
|
||||
#endif /* lint */
|
||||
|
||||
@@ -3681,8 +3669,8 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
|
||||
}
|
||||
case FILE_INDIRECT:
|
||||
diff -u libmagic.orig/strcasestr.c libmagic/strcasestr.c
|
||||
--- libmagic.orig/strcasestr.c 2017-04-10 11:41:09.737268025 +0800
|
||||
+++ libmagic/strcasestr.c 2017-04-10 11:41:14.415268021 +0800
|
||||
--- libmagic.orig/strcasestr.c 2016-01-25 11:31:21.494017704 +0800
|
||||
+++ libmagic/strcasestr.c 2016-01-25 11:31:32.678017695 +0800
|
||||
@@ -39,6 +39,8 @@
|
||||
|
||||
#include "file.h"
|
||||
|
||||
@@ -80,10 +80,6 @@ FILE_RCSID("@(#)$File: apprentice.c,v 1.230 2015/01/02 21:29:39 christos Exp $")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef offsetof
|
||||
#define offsetof(STRUCTURE,FIELD) ((int)((char*)&((STRUCTURE*)0)->FIELD))
|
||||
#endif
|
||||
|
||||
#ifndef MAP_FAILED
|
||||
#define MAP_FAILED (void *) -1
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -325,7 +325,7 @@ dnl Various checks for GD features
|
||||
PHP_GD_FREETYPE2
|
||||
|
||||
dnl Header path
|
||||
for i in include/gd include/gd2 include gd ""; do
|
||||
for i in include/gd include gd ""; do
|
||||
test -f "$PHP_GD/$i/gd.h" && GD_INCLUDE="$PHP_GD/$i"
|
||||
done
|
||||
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@
|
||||
#include "php.h"
|
||||
|
||||
/* This just seems unessacary */
|
||||
#ifdef PHP_WIN32
|
||||
#if PHP_WIN32
|
||||
#define ENABLE_GD_TTF
|
||||
#else
|
||||
#include <php_config.h>
|
||||
|
||||
@@ -30,6 +30,7 @@ if test "$PHP_GETTEXT" != "no"; then
|
||||
AC_MSG_ERROR(Unable to find required gettext library)
|
||||
])
|
||||
)
|
||||
LDFLAGS=$O_LDFLAGS
|
||||
|
||||
AC_DEFINE(HAVE_LIBINTL,1,[ ])
|
||||
PHP_NEW_EXTENSION(gettext, gettext.c, $ext_shared)
|
||||
@@ -45,6 +46,5 @@ if test "$PHP_GETTEXT" != "no"; then
|
||||
AC_CHECK_LIB($GETTEXT_CHECK_IN_LIB, dngettext, [AC_DEFINE(HAVE_DNGETTEXT, 1, [ ])])
|
||||
AC_CHECK_LIB($GETTEXT_CHECK_IN_LIB, dcngettext, [AC_DEFINE(HAVE_DCNGETTEXT, 1, [ ])])
|
||||
AC_CHECK_LIB($GETTEXT_CHECK_IN_LIB, bind_textdomain_codeset, [AC_DEFINE(HAVE_BIND_TEXTDOMAIN_CODESET, 1, [ ])])
|
||||
LDFLAGS=$O_LDFLAGS
|
||||
|
||||
fi
|
||||
@@ -88,10 +88,6 @@ ZEND_BEGIN_ARG_INFO_EX( collator_sort_args, 0, 0, 1 )
|
||||
ZEND_ARG_INFO( 0, flags )
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX( collator_sort_with_sort_keys_args, 0, 0, 1 )
|
||||
ZEND_ARG_ARRAY_INFO( 1, arr, 0 )
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ Collator_class_functions
|
||||
@@ -103,7 +99,7 @@ zend_function_entry Collator_class_functions[] = {
|
||||
ZEND_FENTRY( create, ZEND_FN( collator_create ), collator_1_arg, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
PHP_NAMED_FE( compare, ZEND_FN( collator_compare ), collator_2_args )
|
||||
PHP_NAMED_FE( sort, ZEND_FN( collator_sort ), collator_sort_args )
|
||||
PHP_NAMED_FE( sortWithSortKeys, ZEND_FN( collator_sort_with_sort_keys ), collator_sort_with_sort_keys_args )
|
||||
PHP_NAMED_FE( sortWithSortKeys, ZEND_FN( collator_sort_with_sort_keys ), collator_sort_args )
|
||||
PHP_NAMED_FE( asort, ZEND_FN( collator_asort ), collator_sort_args )
|
||||
PHP_NAMED_FE( getAttribute, ZEND_FN( collator_get_attribute ), collator_1_arg )
|
||||
PHP_NAMED_FE( setAttribute, ZEND_FN( collator_set_attribute ), collator_2_args )
|
||||
|
||||
@@ -125,8 +125,6 @@ U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz,
|
||||
}
|
||||
|
||||
if (millis) {
|
||||
php_date_obj *datetime;
|
||||
|
||||
ZVAL_STRING(&zfuncname, "getTimestamp");
|
||||
if (call_user_function(NULL, z, &zfuncname, &retval, 0, NULL)
|
||||
!= SUCCESS || Z_TYPE(retval) != IS_LONG) {
|
||||
@@ -139,8 +137,7 @@ U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz,
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
datetime = Z_PHPDATE_P(z);
|
||||
*millis = U_MILLIS_PER_SECOND * ((double)Z_LVAL(retval) + datetime->time->f);
|
||||
*millis = U_MILLIS_PER_SECOND * (double)Z_LVAL(retval);
|
||||
zval_ptr_dtor(&zfuncname);
|
||||
}
|
||||
|
||||
@@ -148,8 +145,8 @@ U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz,
|
||||
php_date_obj *datetime;
|
||||
datetime = Z_PHPDATE_P(z);
|
||||
if (!datetime->time) {
|
||||
spprintf(&message, 0, "%s: the %s object is not properly "
|
||||
"initialized", func, ZSTR_VAL(Z_OBJCE_P(z)->name));
|
||||
spprintf(&message, 0, "%s: the DateTime object is not properly "
|
||||
"initialized", func);
|
||||
intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR,
|
||||
message, 1);
|
||||
efree(message);
|
||||
@@ -208,7 +205,7 @@ U_CFUNC double intl_zval_to_millis(zval *z, intl_error *err, const char *func)
|
||||
rv = U_MILLIS_PER_SECOND * Z_DVAL_P(z);
|
||||
break;
|
||||
case IS_OBJECT:
|
||||
if (instanceof_function(Z_OBJCE_P(z), php_date_get_interface_ce())) {
|
||||
if (instanceof_function(Z_OBJCE_P(z), php_date_get_date_ce())) {
|
||||
intl_datetime_decompose(z, &rv, NULL, err, func);
|
||||
} else if (instanceof_function(Z_OBJCE_P(z), Calendar_ce_ptr)) {
|
||||
Calendar_object *co = Z_INTL_CALENDAR_P(z);
|
||||
@@ -231,7 +228,7 @@ U_CFUNC double intl_zval_to_millis(zval *z, intl_error *err, const char *func)
|
||||
} else {
|
||||
/* TODO: try with cast(), get() to obtain a number */
|
||||
spprintf(&message, 0, "%s: invalid object type for date/time "
|
||||
"(only IntlCalendar and DateTimeInterface permitted)", func);
|
||||
"(only IntlCalendar and DateTime permitted)", func);
|
||||
intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR,
|
||||
message, 1);
|
||||
efree(message);
|
||||
|
||||
@@ -38,34 +38,26 @@ zend_class_entry *Locale_ce_ptr = NULL;
|
||||
ZEND_BEGIN_ARG_INFO_EX( locale_0_args, 0, 0, 0 )
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX( locale_arg_locale, 0, 0, 1 )
|
||||
ZEND_ARG_INFO( 0, locale )
|
||||
ZEND_BEGIN_ARG_INFO_EX( locale_1_arg, 0, 0, 1 )
|
||||
ZEND_ARG_INFO( 0, arg1 )
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX( locale_accept_from_http_args, 0, 0, 1 )
|
||||
ZEND_ARG_INFO( 0, header )
|
||||
ZEND_BEGIN_ARG_INFO_EX( locale_2_args, 0, 0, 2 )
|
||||
ZEND_ARG_INFO( 0, arg1 )
|
||||
ZEND_ARG_INFO( 0, arg2 )
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX( locale_compose_args, 0, 0, 1 )
|
||||
ZEND_ARG_INFO( 0, subtags )
|
||||
ZEND_BEGIN_ARG_INFO_EX( locale_3_args, 0, 0, 3 )
|
||||
ZEND_ARG_INFO( 0, arg1 )
|
||||
ZEND_ARG_INFO( 0, arg2 )
|
||||
ZEND_ARG_INFO( 0, arg3 )
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX( locale_2_args, 0, 0, 1 )
|
||||
ZEND_ARG_INFO( 0, locale )
|
||||
ZEND_ARG_INFO( 0, in_locale )
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX( locale_filter_matches_args, 0, 0, 2 )
|
||||
ZEND_ARG_INFO( 0, langtag )
|
||||
ZEND_ARG_INFO( 0, locale )
|
||||
ZEND_ARG_INFO( 0, canonicalize )
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX( locale_lookup_args, 0, 0, 2 )
|
||||
ZEND_ARG_INFO( 0, langtag )
|
||||
ZEND_ARG_INFO( 0, locale )
|
||||
ZEND_ARG_INFO( 0, canonicalize )
|
||||
ZEND_ARG_INFO( 0, default )
|
||||
ZEND_BEGIN_ARG_INFO_EX( locale_4_args, 0, 0, 4 )
|
||||
ZEND_ARG_INFO( 0, arg1 )
|
||||
ZEND_ARG_INFO( 0, arg2 )
|
||||
ZEND_ARG_INFO( 0, arg3 )
|
||||
ZEND_ARG_INFO( 0, arg4 )
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
/* }}} */
|
||||
@@ -76,23 +68,23 @@ ZEND_END_ARG_INFO()
|
||||
|
||||
zend_function_entry Locale_class_functions[] = {
|
||||
ZEND_FENTRY( getDefault, zif_locale_get_default , locale_0_args , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( setDefault, zif_locale_set_default , locale_arg_locale , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getPrimaryLanguage, ZEND_FN( locale_get_primary_language ), locale_arg_locale , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getScript, ZEND_FN( locale_get_script ), locale_arg_locale , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getRegion, ZEND_FN( locale_get_region ), locale_arg_locale , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getKeywords, ZEND_FN( locale_get_keywords ), locale_arg_locale , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( setDefault, zif_locale_set_default , locale_1_arg , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getPrimaryLanguage, ZEND_FN( locale_get_primary_language ), locale_1_arg , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getScript, ZEND_FN( locale_get_script ), locale_1_arg , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getRegion, ZEND_FN( locale_get_region ), locale_1_arg , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getKeywords, ZEND_FN( locale_get_keywords ), locale_1_arg , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getDisplayScript, ZEND_FN( locale_get_display_script ), locale_2_args , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getDisplayRegion, ZEND_FN( locale_get_display_region ), locale_2_args , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getDisplayName, ZEND_FN( locale_get_display_name ), locale_2_args , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getDisplayLanguage, ZEND_FN( locale_get_display_language ), locale_2_args , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getDisplayVariant, ZEND_FN( locale_get_display_variant ), locale_2_args , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( composeLocale, ZEND_FN( locale_compose ), locale_compose_args , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( parseLocale, ZEND_FN( locale_parse ), locale_arg_locale , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getAllVariants, ZEND_FN( locale_get_all_variants ), locale_arg_locale , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( filterMatches, ZEND_FN( locale_filter_matches ), locale_filter_matches_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( lookup, ZEND_FN( locale_lookup ), locale_lookup_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( canonicalize, ZEND_FN( locale_canonicalize ), locale_arg_locale , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( acceptFromHttp, ZEND_FN( locale_accept_from_http ), locale_accept_from_http_args , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( composeLocale, ZEND_FN( locale_compose ), locale_1_arg , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( parseLocale, ZEND_FN( locale_parse ), locale_1_arg , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( getAllVariants, ZEND_FN( locale_get_all_variants ), locale_1_arg , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( filterMatches, ZEND_FN( locale_filter_matches ), locale_3_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( lookup, ZEND_FN( locale_lookup ), locale_4_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( canonicalize, ZEND_FN( locale_canonicalize ), locale_1_arg , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( acceptFromHttp, ZEND_FN( locale_accept_from_http ), locale_1_arg , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
@@ -29,9 +29,10 @@ zend_class_entry *Normalizer_ce_ptr = NULL;
|
||||
|
||||
/* {{{ Normalizer methods arguments info */
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX( normalizer_args, 0, 0, 1 )
|
||||
ZEND_ARG_INFO( 0, input )
|
||||
ZEND_ARG_INFO( 0, form )
|
||||
ZEND_BEGIN_ARG_INFO_EX( normalizer_3_args, 0, 0, 3 )
|
||||
ZEND_ARG_INFO( 0, arg1 )
|
||||
ZEND_ARG_INFO( 0, arg2 )
|
||||
ZEND_ARG_INFO( 0, arg3 )
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
/* }}} */
|
||||
@@ -41,8 +42,8 @@ ZEND_END_ARG_INFO()
|
||||
*/
|
||||
|
||||
zend_function_entry Normalizer_class_functions[] = {
|
||||
ZEND_FENTRY( normalize, ZEND_FN( normalizer_normalize ), normalizer_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( isNormalized, ZEND_FN( normalizer_is_normalized ), normalizer_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( normalize, ZEND_FN( normalizer_normalize ), normalizer_3_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
ZEND_FENTRY( isNormalized, ZEND_FN( normalizer_is_normalized ), normalizer_3_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
+1
-6
@@ -154,11 +154,6 @@ ZEND_BEGIN_ARG_INFO_EX(collator_sort_args, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, sort_flags)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(collator_sort_with_sort_keys_args, 0, 0, 2)
|
||||
ZEND_ARG_OBJ_INFO(0, coll, Collator, 0)
|
||||
ZEND_ARG_ARRAY_INFO(1, arr, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(numfmt_parse_arginfo, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, formatter)
|
||||
ZEND_ARG_INFO(0, string)
|
||||
@@ -634,7 +629,7 @@ zend_function_entry intl_functions[] = {
|
||||
PHP_FE( collator_get_strength, collator_0_args )
|
||||
PHP_FE( collator_set_strength, collator_1_arg )
|
||||
PHP_FE( collator_sort, collator_sort_args )
|
||||
PHP_FE( collator_sort_with_sort_keys, collator_sort_with_sort_keys_args )
|
||||
PHP_FE( collator_sort_with_sort_keys, collator_sort_args )
|
||||
PHP_FE( collator_asort, collator_sort_args )
|
||||
PHP_FE( collator_get_locale, collator_1_arg )
|
||||
PHP_FE( collator_get_error_code, collator_0_args )
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
--TEST--
|
||||
Bug #74298 (IntlDateFormatter->format() doesn't return microseconds/fractions)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded('intl')) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump((new \DateTime('2017-01-01 01:02:03.123456'))->format('Y-m-d\TH:i:s.u'));
|
||||
|
||||
var_dump((new \IntlDateFormatter(
|
||||
'en-US',
|
||||
\IntlDateFormatter::FULL,
|
||||
\IntlDateFormatter::FULL,
|
||||
'UTC',
|
||||
\IntlDateFormatter::GREGORIAN,
|
||||
'yyyy-MM-dd HH:mm:ss.SSSSSS'
|
||||
))->format(new \DateTime('2017-01-01 01:02:03.123456')));
|
||||
|
||||
var_dump(datefmt_create(
|
||||
'en-US',
|
||||
\IntlDateFormatter::FULL,
|
||||
\IntlDateFormatter::FULL,
|
||||
'UTC',
|
||||
\IntlDateFormatter::GREGORIAN,
|
||||
'yyyy-MM-dd HH:mm:ss.SSSSSS'
|
||||
)->format(new \DateTime('2017-01-01 01:02:03.123456')));
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(26) "2017-01-01T01:02:03.123456"
|
||||
string(26) "2017-01-01 01:02:03.123000"
|
||||
string(26) "2017-01-01 01:02:03.123000"
|
||||
@@ -1,20 +0,0 @@
|
||||
--TEST--
|
||||
Bug #74433 Wrong reflection on the Normalizer methods
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded('intl')) die('skip intl extension not available'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$rm = new ReflectionMethod(Normalizer::class, 'isNormalized');
|
||||
var_dump($rm->getNumberOfParameters());
|
||||
var_dump($rm->getNumberOfRequiredParameters());
|
||||
$rm = new ReflectionMethod(Normalizer::class, 'normalize');
|
||||
var_dump($rm->getNumberOfParameters());
|
||||
var_dump($rm->getNumberOfRequiredParameters());
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
int(2)
|
||||
int(1)
|
||||
int(2)
|
||||
int(1)
|
||||
===DONE===
|
||||
@@ -1,22 +0,0 @@
|
||||
--TEST--
|
||||
Bug #74468 Wrong reflection on Collator::sortWithSortKeys
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$rm = new ReflectionMethod(Collator::class, 'sortWithSortKeys');
|
||||
var_dump($rm->getNumberOfParameters());
|
||||
var_dump($rm->getNumberOfRequiredParameters());
|
||||
|
||||
$rf = new ReflectionFunction('collator_sort_with_sort_keys');
|
||||
var_dump($rf->getNumberOfParameters());
|
||||
var_dump($rf->getNumberOfRequiredParameters());
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
int(1)
|
||||
int(1)
|
||||
int(2)
|
||||
int(2)
|
||||
===DONE===
|
||||
@@ -1,16 +0,0 @@
|
||||
--TEST--
|
||||
Bug #65683 IntlDateFormatter accepts DateTimeImmutable
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$formatter = new IntlDateFormatter('en-US', IntlDateFormatter::FULL, IntlDateFormatter::NONE, new DateTimeZone("UTC"));
|
||||
var_dump($formatter->format(new DateTimeImmutable('2017-03-27 00:00:00 UTC'))) . "\n";
|
||||
|
||||
?>
|
||||
==DONE==
|
||||
--EXPECTF--
|
||||
string(%s) "Monday, March %d, 2017"
|
||||
==DONE==
|
||||
@@ -400,24 +400,24 @@ Formatted DateTime is : 20001230 05:04 PM
|
||||
Date is: stdClass::__set_state(array(
|
||||
))
|
||||
------------
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTimeInterface permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
------------
|
||||
Date is: stdClass::__set_state(array(
|
||||
))
|
||||
------------
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTimeInterface permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
------------
|
||||
Date is: stdClass::__set_state(array(
|
||||
))
|
||||
------------
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTimeInterface permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
------------
|
||||
Date is: stdClass::__set_state(array(
|
||||
))
|
||||
------------
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTimeInterface permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
------------
|
||||
Date is: stdClass::__set_state(array(
|
||||
))
|
||||
------------
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTimeInterface permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
@@ -400,24 +400,24 @@ Formatted DateTime is : 20001230 05:04 PM
|
||||
Date is: stdClass::__set_state(array(
|
||||
))
|
||||
------------
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTimeInterface permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
------------
|
||||
Date is: stdClass::__set_state(array(
|
||||
))
|
||||
------------
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTimeInterface permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
------------
|
||||
Date is: stdClass::__set_state(array(
|
||||
))
|
||||
------------
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTimeInterface permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
------------
|
||||
Date is: stdClass::__set_state(array(
|
||||
))
|
||||
------------
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTimeInterface permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
------------
|
||||
Date is: stdClass::__set_state(array(
|
||||
))
|
||||
------------
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTimeInterface permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
@@ -400,24 +400,24 @@ Formatted DateTime is : 20001230 05:04 PM
|
||||
Date is: stdClass::__set_state(array(
|
||||
))
|
||||
------------
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTimeInterface permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
------------
|
||||
Date is: stdClass::__set_state(array(
|
||||
))
|
||||
------------
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTimeInterface permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
------------
|
||||
Date is: stdClass::__set_state(array(
|
||||
))
|
||||
------------
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTimeInterface permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
------------
|
||||
Date is: stdClass::__set_state(array(
|
||||
))
|
||||
------------
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTimeInterface permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
------------
|
||||
Date is: stdClass::__set_state(array(
|
||||
))
|
||||
------------
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTimeInterface permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
Error while formatting as: 'datefmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted): U_ILLEGAL_ARGUMENT_ERROR'
|
||||
@@ -1,54 +0,0 @@
|
||||
--TEST--
|
||||
Bug #74439 Wrong reflection on the Locale methods
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded('intl')) die('skip intl extension not available'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$methods = [
|
||||
'getDefault',
|
||||
'acceptFromHttp',
|
||||
'canonicalize',
|
||||
'composeLocale',
|
||||
'getAllVariants',
|
||||
'getKeywords',
|
||||
'getPrimaryLanguage',
|
||||
'getRegion',
|
||||
'getScript',
|
||||
'parseLocale',
|
||||
'setDefault',
|
||||
'getDisplayLanguage',
|
||||
'getDisplayName',
|
||||
'getDisplayRegion',
|
||||
'getDisplayScript',
|
||||
'getDisplayVariant',
|
||||
'filterMatches',
|
||||
'lookup',
|
||||
];
|
||||
|
||||
foreach ($methods as $method) {
|
||||
$rm = new ReflectionMethod(Locale::class, $method);
|
||||
printf("%s: %d, %d\n", $method, $rm->getNumberOfParameters(), $rm->getNumberOfRequiredParameters());
|
||||
}
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
getDefault: 0, 0
|
||||
acceptFromHttp: 1, 1
|
||||
canonicalize: 1, 1
|
||||
composeLocale: 1, 1
|
||||
getAllVariants: 1, 1
|
||||
getKeywords: 1, 1
|
||||
getPrimaryLanguage: 1, 1
|
||||
getRegion: 1, 1
|
||||
getScript: 1, 1
|
||||
parseLocale: 1, 1
|
||||
setDefault: 1, 1
|
||||
getDisplayLanguage: 2, 1
|
||||
getDisplayName: 2, 1
|
||||
getDisplayRegion: 2, 1
|
||||
getDisplayScript: 2, 1
|
||||
getDisplayVariant: 2, 1
|
||||
filterMatches: 3, 2
|
||||
lookup: 4, 2
|
||||
===DONE===
|
||||
@@ -16,16 +16,13 @@ $fmt = <<<EOD
|
||||
EOD;
|
||||
|
||||
$dt = new DateTime("2012-05-06 18:00:42", new DateTimeZone("Europe/Lisbon"));
|
||||
$dti = new DateTimeImmutable("2012-05-06 18:00:42", new DateTimeZone("Europe/Lisbon"));
|
||||
|
||||
$mf = new MessageFormatter('en_US', $fmt);
|
||||
|
||||
var_dump($mf->format(array($dt)));
|
||||
var_dump($mf->format(array($dti)));
|
||||
|
||||
?>
|
||||
==DONE==
|
||||
--EXPECTF--
|
||||
string(%s) "May %d, 2012 %d:%d:42 %s"
|
||||
string(%s) "May %d, 2012 %d:%d:42 %s"
|
||||
==DONE==
|
||||
@@ -20,7 +20,7 @@ $mf = new MessageFormatter('en_US', $fmt);
|
||||
var_dump($mf->format(array("foo" => new stdclass())));
|
||||
|
||||
--EXPECTF--
|
||||
Warning: MessageFormatter::format(): msgfmt_format: invalid object type for date/time (only IntlCalendar and DateTimeInterface permitted) in %s on line %d
|
||||
Warning: MessageFormatter::format(): msgfmt_format: invalid object type for date/time (only IntlCalendar and DateTime permitted) in %s on line %d
|
||||
|
||||
Warning: MessageFormatter::format(): The argument for key 'foo' cannot be used as a date or time in %s on line %d
|
||||
bool(false)
|
||||
@@ -19,8 +19,8 @@ var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_LONG, 'pt_PT'));
|
||||
|
||||
?>
|
||||
==DONE==
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
string(30) "Western European Standard Time"
|
||||
string(30) "Western European Standard Time"
|
||||
string(32) "Hora %cadrão da Europa Ocidental"
|
||||
string(32) "Hora Padrão da Europa Ocidental"
|
||||
==DONE==
|
||||
+2
-2
@@ -26,7 +26,7 @@
|
||||
|
||||
#if HAVE_LIBMCRYPT
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
#if PHP_WIN32
|
||||
# include "win32/winutil.h"
|
||||
#endif
|
||||
|
||||
@@ -1376,7 +1376,7 @@ PHP_FUNCTION(mcrypt_create_iv)
|
||||
iv = ecalloc(size + 1, 1);
|
||||
|
||||
if (source == RANDOM || source == URANDOM) {
|
||||
#ifdef PHP_WIN32
|
||||
#if PHP_WIN32
|
||||
/* random/urandom equivalent on Windows */
|
||||
BYTE *iv_b = (BYTE *) iv;
|
||||
if (php_win32_get_random_bytes(iv_b, (size_t) size) == FAILURE){
|
||||
|
||||
@@ -619,7 +619,7 @@ PHP_FUNCTION(mysqli_change_user)
|
||||
const CHARSET_INFO * old_charset;
|
||||
#endif
|
||||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Osss!", &mysql_link, mysqli_link_class_entry, &user, &user_len, &password, &password_len, &dbname, &dbname_len) == FAILURE) {
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Osss", &mysql_link, mysqli_link_class_entry, &user, &user_len, &password, &password_len, &dbname, &dbname_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
|
||||
|
||||
+6
-30
@@ -261,17 +261,6 @@ ZEND_END_ARG_INFO()
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_query, 0, 0, 2)
|
||||
MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
|
||||
ZEND_ARG_INFO(0, query)
|
||||
ZEND_ARG_INFO(0, resultmode)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_multi_query, 0, 0, 1)
|
||||
MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
|
||||
ZEND_ARG_INFO(0, query)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_real_query, 0, 0, 1)
|
||||
MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
|
||||
ZEND_ARG_INFO(0, query)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_prepare, 0, 0, 2)
|
||||
@@ -286,19 +275,6 @@ ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_query, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, query)
|
||||
ZEND_ARG_INFO(0, resultmode)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_prepare, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, query)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_multi_query, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, query)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_real_query, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, query)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_options, 0, 0, 3)
|
||||
@@ -466,7 +442,7 @@ const zend_function_entry mysqli_functions[] = {
|
||||
PHP_FE(mysqli_insert_id, arginfo_mysqli_only_link)
|
||||
PHP_FE(mysqli_kill, arginfo_mysqli_kill)
|
||||
PHP_FE(mysqli_more_results, arginfo_mysqli_only_link)
|
||||
PHP_FE(mysqli_multi_query, arginfo_mysqli_multi_query)
|
||||
PHP_FE(mysqli_multi_query, arginfo_mysqli_query)
|
||||
PHP_FE(mysqli_next_result, arginfo_mysqli_only_link)
|
||||
PHP_FE(mysqli_num_fields, arginfo_mysqli_only_result)
|
||||
PHP_FE(mysqli_num_rows, arginfo_mysqli_only_result)
|
||||
@@ -480,7 +456,7 @@ const zend_function_entry mysqli_functions[] = {
|
||||
PHP_FE(mysqli_query, arginfo_mysqli_query)
|
||||
PHP_FE(mysqli_real_connect, arginfo_mysqli_real_connect)
|
||||
PHP_FE(mysqli_real_escape_string, arginfo_mysqli_real_escape_string)
|
||||
PHP_FE(mysqli_real_query, arginfo_mysqli_real_query)
|
||||
PHP_FE(mysqli_real_query, arginfo_mysqli_query)
|
||||
#if defined(MYSQLI_USE_MYSQLND)
|
||||
PHP_FE(mysqli_reap_async_query, arginfo_mysqli_only_link)
|
||||
#endif
|
||||
@@ -566,7 +542,7 @@ const zend_function_entry mysqli_link_methods[] = {
|
||||
PHP_FALIAS(get_warnings, mysqli_get_warnings, arginfo_mysqli_no_params)
|
||||
PHP_FALIAS(init,mysqli_init_method, arginfo_mysqli_no_params)
|
||||
PHP_FALIAS(kill,mysqli_kill, arginfo_class_mysqli_kill)
|
||||
PHP_FALIAS(multi_query, mysqli_multi_query, arginfo_class_mysqli_multi_query)
|
||||
PHP_FALIAS(multi_query, mysqli_multi_query, arginfo_class_mysqli_query)
|
||||
PHP_FALIAS(__construct, mysqli_link_construct, arginfo_mysqli_connect)
|
||||
PHP_FALIAS(more_results, mysqli_more_results, arginfo_mysqli_no_params)
|
||||
PHP_FALIAS(next_result, mysqli_next_result, arginfo_mysqli_no_params)
|
||||
@@ -575,7 +551,7 @@ const zend_function_entry mysqli_link_methods[] = {
|
||||
#if defined(MYSQLI_USE_MYSQLND)
|
||||
ZEND_FENTRY(poll, ZEND_FN(mysqli_poll), arginfo_mysqli_poll, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
|
||||
#endif
|
||||
PHP_FALIAS(prepare, mysqli_prepare, arginfo_class_mysqli_prepare)
|
||||
PHP_FALIAS(prepare, mysqli_prepare, arginfo_class_mysqli_query)
|
||||
PHP_FALIAS(query, mysqli_query, arginfo_class_mysqli_query)
|
||||
PHP_FALIAS(real_connect, mysqli_real_connect, arginfo_class_mysqli_real_connect)
|
||||
PHP_FALIAS(real_escape_string, mysqli_real_escape_string, arginfo_class_mysqli_real_escape_string)
|
||||
@@ -583,7 +559,7 @@ const zend_function_entry mysqli_link_methods[] = {
|
||||
PHP_FALIAS(reap_async_query, mysqli_reap_async_query, arginfo_mysqli_no_params)
|
||||
#endif
|
||||
PHP_FALIAS(escape_string, mysqli_real_escape_string, arginfo_class_mysqli_real_escape_string)
|
||||
PHP_FALIAS(real_query, mysqli_real_query, arginfo_class_mysqli_real_query)
|
||||
PHP_FALIAS(real_query, mysqli_real_query, arginfo_class_mysqli_query)
|
||||
PHP_FALIAS(release_savepoint, mysqli_release_savepoint, arginfo_class_mysqli_release_savepoint)
|
||||
PHP_FALIAS(rollback, mysqli_rollback, arginfo_class_mysqli_rollback)
|
||||
PHP_FALIAS(savepoint, mysqli_savepoint, arginfo_class_mysqli_savepoint)
|
||||
@@ -652,7 +628,7 @@ const zend_function_entry mysqli_stmt_methods[] = {
|
||||
PHP_FALIAS(send_long_data, mysqli_stmt_send_long_data, arginfo_class_mysqli_stmt_send_long_data)
|
||||
PHP_FALIAS(free_result, mysqli_stmt_free_result, arginfo_mysqli_no_params)
|
||||
PHP_FALIAS(reset, mysqli_stmt_reset, arginfo_mysqli_no_params)
|
||||
PHP_FALIAS(prepare, mysqli_stmt_prepare, arginfo_class_mysqli_prepare)
|
||||
PHP_FALIAS(prepare, mysqli_stmt_prepare, arginfo_class_mysqli_query)
|
||||
PHP_FALIAS(store_result, mysqli_stmt_store_result, arginfo_mysqli_no_params)
|
||||
#if defined(MYSQLI_USE_MYSQLND)
|
||||
PHP_FALIAS(get_result, mysqli_stmt_get_result, arginfo_mysqli_no_params)
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
--TEST--
|
||||
Bug #74547 mysqli::change_user() doesn't accept null as $database argument w/strict_types
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once('skipif.inc');
|
||||
require_once('skipifconnectfailure.inc');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
require_once("connect.inc");
|
||||
|
||||
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
|
||||
printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
|
||||
$host, $user, $db, $port, $socket);
|
||||
|
||||
var_dump(mysqli_change_user($link, $user, $passwd, NULL));
|
||||
|
||||
mysqli_close($link);
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
===DONE===
|
||||
@@ -1,25 +0,0 @@
|
||||
--TEST--
|
||||
Bug #74595 (ReflectionMethod::getParameters returns incorrect number of parameters)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once('skipif.inc');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$class = new ReflectionClass('mysqli');
|
||||
$method = $class->getMethod('query');
|
||||
var_dump($method->getParameters());
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(2) {
|
||||
[0]=>
|
||||
object(ReflectionParameter)#%d (1) {
|
||||
["name"]=>
|
||||
string(5) "query"
|
||||
}
|
||||
[1]=>
|
||||
object(ReflectionParameter)#%d (1) {
|
||||
["name"]=>
|
||||
string(10) "resultmode"
|
||||
}
|
||||
}
|
||||
@@ -732,7 +732,7 @@ isInternal: yes
|
||||
isUserDefined: no
|
||||
returnsReference: no
|
||||
Modifiers: 256
|
||||
Number of Parameters: 2
|
||||
Number of Parameters: 1
|
||||
Number of Required Parameters: 1
|
||||
|
||||
Inspecting parameter 'query' of method 'query'
|
||||
@@ -742,13 +742,6 @@ isPassedByReference: no
|
||||
isOptional: no
|
||||
isDefaultValueAvailable: no
|
||||
|
||||
Inspecting parameter 'resultmode' of method 'query'
|
||||
isArray: no
|
||||
allowsNull: no
|
||||
isPassedByReference: no
|
||||
isOptional: yes
|
||||
isDefaultValueAvailable: no
|
||||
|
||||
Inspecting method 'real_connect'
|
||||
isFinal: no
|
||||
isAbstract: no
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
--TEST--
|
||||
Bug #74432, BC issue on undocumented connect string
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once('skipif.inc');
|
||||
require_once('skipifemb.inc');
|
||||
require_once('skipifconnectfailure.inc');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
/* This behavior is undocumented, but might be in use. Until there's no officially
|
||||
supported alternative, ensure changes doesn't cause BC breach. Otherwise,
|
||||
the test should be removed once the undocumented behavior changes. */
|
||||
|
||||
require_once("connect.inc");
|
||||
|
||||
$handle = mysqli_connect("$host:$port", $user, $passwd);
|
||||
|
||||
var_dump($handle);
|
||||
|
||||
if ($handle) {
|
||||
mysqli_close($handle);
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
object(mysqli)#%d (%d) {
|
||||
%A
|
||||
}
|
||||
|
||||
@@ -687,53 +687,6 @@ const MYSQLND_CHARSET mysqlnd_charsets[] =
|
||||
{ 249, "gb18030", "gb18030_bin", 1, 4, "", mysqlnd_mbcharlen_gb18030, my_ismbchar_gb18030},
|
||||
|
||||
{ 254, UTF8_MB3, UTF8_MB3"_general_cs", 1, 3, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 255, UTF8_MB4, UTF8_MB4"_0900_ai_ci", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 256, UTF8_MB4, UTF8_MB4"_de_pb_0900_ai_ci", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 257, UTF8_MB4, UTF8_MB4"_is_0900_ai_ci", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 258, UTF8_MB4, UTF8_MB4"_lv_0900_ai_ci", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 259, UTF8_MB4, UTF8_MB4"_ro_0900_ai_ci", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 260, UTF8_MB4, UTF8_MB4"_sl_0900_ai_ci", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 261, UTF8_MB4, UTF8_MB4"_pl_0900_ai_ci", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 262, UTF8_MB4, UTF8_MB4"_et_0900_ai_ci", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 263, UTF8_MB4, UTF8_MB4"_es_0900_ai_ci", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 264, UTF8_MB4, UTF8_MB4"_sv_0900_ai_ci", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 265, UTF8_MB4, UTF8_MB4"_tr_0900_ai_ci", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 266, UTF8_MB4, UTF8_MB4"_cs_0900_ai_ci", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 267, UTF8_MB4, UTF8_MB4"_da_0900_ai_ci", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 268, UTF8_MB4, UTF8_MB4"_lt_0900_ai_ci", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 269, UTF8_MB4, UTF8_MB4"_sk_0900_ai_ci", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 270, UTF8_MB4, UTF8_MB4"_es_trad_0900_ai_ci", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 271, UTF8_MB4, UTF8_MB4"_la_0900_ai_ci", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 272, UTF8_MB4, UTF8_MB4"_fa_0900_ai_ci", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 273, UTF8_MB4, UTF8_MB4"_eo_0900_ai_ci", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 274, UTF8_MB4, UTF8_MB4"_hu_0900_ai_ci", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 275, UTF8_MB4, UTF8_MB4"_hr_0900_ai_ci", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 276, UTF8_MB4, UTF8_MB4"_si_0900_ai_ci", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 277, UTF8_MB4, UTF8_MB4"_vi_0900_ai_ci", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 278, UTF8_MB4, UTF8_MB4"_0900_as_cs", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 279, UTF8_MB4, UTF8_MB4"_de_pb_0900_as_cs", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 280, UTF8_MB4, UTF8_MB4"_is_0900_as_cs", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 281, UTF8_MB4, UTF8_MB4"_lv_0900_as_cs", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 282, UTF8_MB4, UTF8_MB4"_ro_0900_as_cs", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 283, UTF8_MB4, UTF8_MB4"_sl_0900_as_cs", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 284, UTF8_MB4, UTF8_MB4"_pl_0900_as_cs", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 285, UTF8_MB4, UTF8_MB4"_et_0900_as_cs", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 286, UTF8_MB4, UTF8_MB4"_es_0900_as_cs", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 287, UTF8_MB4, UTF8_MB4"_sv_0900_as_cs", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 288, UTF8_MB4, UTF8_MB4"_tr_0900_as_cs", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 289, UTF8_MB4, UTF8_MB4"_cs_0900_as_cs", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 290, UTF8_MB4, UTF8_MB4"_da_0900_as_cs", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 291, UTF8_MB4, UTF8_MB4"_lt_0900_as_cs", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 292, UTF8_MB4, UTF8_MB4"_sk_0900_as_cs", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 293, UTF8_MB4, UTF8_MB4"_es_trad_0900_as_cs", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 294, UTF8_MB4, UTF8_MB4"_la_0900_as_cs", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 295, UTF8_MB4, UTF8_MB4"_fa_0900_as_cs", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 296, UTF8_MB4, UTF8_MB4"_eo_0900_as_cs", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 297, UTF8_MB4, UTF8_MB4"_hu_0900_as_cs", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 298, UTF8_MB4, UTF8_MB4"_hr_0900_as_cs", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 299, UTF8_MB4, UTF8_MB4"_si_0900_as_cs", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 300, UTF8_MB4, UTF8_MB4"_vi_0900_as_cs", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 303, UTF8_MB4, UTF8_MB4"_ja_0900_as_cs", 1, 4, "", mysqlnd_mbcharlen_utf8, check_mb_utf8_valid},
|
||||
{ 0, NULL, NULL, 0, 0, NULL, NULL, NULL}
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
@@ -122,7 +122,7 @@ MYSQLND_METHOD(mysqlnd_stmt, store_result)(MYSQLND_STMT * const s)
|
||||
} else {
|
||||
COPY_CLIENT_ERROR(conn->error_info, result->stored_data->error_info);
|
||||
stmt->result->m.free_result_contents(stmt->result);
|
||||
mnd_pefree(stmt->result, stmt->result->persistent);
|
||||
mnd_efree(stmt->result);
|
||||
stmt->result = NULL;
|
||||
stmt->state = MYSQLND_STMT_PREPARED;
|
||||
}
|
||||
@@ -347,7 +347,7 @@ mysqlnd_stmt_prepare_read_eof(MYSQLND_STMT * s)
|
||||
if (FAIL == (ret = PACKET_READ(fields_eof))) {
|
||||
if (stmt->result) {
|
||||
stmt->result->m.free_result_contents(stmt->result);
|
||||
mnd_pefree(stmt->result, stmt->result->persistent);
|
||||
mnd_efree(stmt->result);
|
||||
/* XXX: This will crash, because we will null also the methods.
|
||||
But seems it happens in extreme cases or doesn't. Should be fixed by exporting a function
|
||||
(from mysqlnd_driver.c?) to do the reset.
|
||||
|
||||
+4
-20
@@ -46,12 +46,12 @@ Interoperability Support" (ID 207303.1) for details.
|
||||
<active>no</active>
|
||||
</lead>
|
||||
|
||||
<date>2017-04-12</date>
|
||||
<date>2016-10-17</date>
|
||||
<time>12:00:00</time>
|
||||
|
||||
<version>
|
||||
<release>2.1.4</release>
|
||||
<api>2.1.4</api>
|
||||
<release>2.1.3</release>
|
||||
<api>2.1.3</api>
|
||||
</version>
|
||||
<stability>
|
||||
<release>stable</release>
|
||||
@@ -60,7 +60,7 @@ Interoperability Support" (ID 207303.1) for details.
|
||||
<license uri="http://www.php.net/license">PHP</license>
|
||||
<notes>
|
||||
This version is for PHP 7 only.
|
||||
Fixed uninitialized data causing random crash
|
||||
Fixed bug #71148 (Bind reference overwritten on PHP 7)
|
||||
</notes>
|
||||
<contents>
|
||||
<dir name="/">
|
||||
@@ -468,22 +468,6 @@ Fixed uninitialized data causing random crash
|
||||
</extsrcrelease>
|
||||
<changelog>
|
||||
|
||||
<release>
|
||||
<version>
|
||||
<release>2.1.3</release>
|
||||
<api>2.1.3</api>
|
||||
</version>
|
||||
<stability>
|
||||
<release>stable</release>
|
||||
<api>stable</api>
|
||||
</stability>
|
||||
<license uri="http://www.php.net/license">PHP</license>
|
||||
<notes>
|
||||
This version is for PHP 7 only.
|
||||
Fixed bug #71148 (Bind reference overwritten on PHP 7)
|
||||
</notes>
|
||||
</release>
|
||||
|
||||
<release>
|
||||
<version>
|
||||
<release>2.1.2</release>
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@
|
||||
*/
|
||||
#undef PHP_OCI8_VERSION
|
||||
#endif
|
||||
#define PHP_OCI8_VERSION "2.1.4"
|
||||
#define PHP_OCI8_VERSION "2.1.3"
|
||||
|
||||
extern zend_module_entry oci8_module_entry;
|
||||
#define phpext_oci8_ptr &oci8_module_entry
|
||||
|
||||
@@ -165,7 +165,7 @@ static void zend_optimize_block(zend_basic_block *block, zend_op_array *op_array
|
||||
COPY_NODE(opline->op1, src->op1);
|
||||
VAR_SOURCE(op1) = NULL;
|
||||
MAKE_NOP(src);
|
||||
} else if (opline->opcode != ZEND_FETCH_LIST && opline->opcode != ZEND_CASE) {
|
||||
} else {
|
||||
zval c = ZEND_OP1_LITERAL(src);
|
||||
zval_copy_ctor(&c);
|
||||
if (zend_optimizer_update_op1_const(op_array, opline, &c)) {
|
||||
@@ -1176,10 +1176,7 @@ static void zend_jmp_optimization(zend_basic_block *block, zend_op_array *op_arr
|
||||
if (block->successors[0] == block->successors[1]) {
|
||||
/* L: JMP[N]Z(X, L+1) -> NOP or FREE(X) */
|
||||
|
||||
if (last_op->op1_type == IS_CV) {
|
||||
last_op->opcode = ZEND_CHECK_VAR;
|
||||
last_op->op2.num = 0;
|
||||
} else if (last_op->op1_type & (IS_VAR|IS_TMP_VAR)) {
|
||||
if (last_op->op1_type & (IS_VAR|IS_TMP_VAR)) {
|
||||
last_op->opcode = ZEND_FREE;
|
||||
last_op->op2.num = 0;
|
||||
} else {
|
||||
|
||||
@@ -146,9 +146,6 @@ void zend_optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_ctx
|
||||
LITERAL_INFO(opline->op2.constant, LITERAL_FUNC, 1, 1, 3);
|
||||
break;
|
||||
case ZEND_INIT_METHOD_CALL:
|
||||
if (ZEND_OP1_TYPE(opline) == IS_CONST) {
|
||||
LITERAL_INFO(opline->op1.constant, LITERAL_VALUE, 1, 0, 1);
|
||||
}
|
||||
if (ZEND_OP2_TYPE(opline) == IS_CONST) {
|
||||
optimizer_literal_obj_info(
|
||||
info,
|
||||
|
||||
@@ -162,12 +162,8 @@ static void zend_ssa_remove_nops(zend_op_array *op_array, zend_ssa *ssa)
|
||||
zend_op *opline;
|
||||
zend_op *new_opline;
|
||||
|
||||
b->len = target - b->start;
|
||||
opline = op_array->opcodes + end - 1;
|
||||
if (opline->opcode == ZEND_NOP) {
|
||||
continue;
|
||||
}
|
||||
|
||||
b->len = target - b->start;
|
||||
new_opline = op_array->opcodes + target - 1;
|
||||
switch (new_opline->opcode) {
|
||||
case ZEND_JMP:
|
||||
@@ -366,13 +362,6 @@ static zend_bool opline_supports_assign_contraction(
|
||||
&& (opline->op2_type != IS_CV || opline->op2.var != cv_var);
|
||||
}
|
||||
|
||||
if (opline->opcode == ZEND_CAST
|
||||
&& (opline->extended_value == IS_ARRAY || opline->extended_value == IS_OBJECT)) {
|
||||
/* CAST to array/object may initialize the result to an empty array/object before
|
||||
* reading the expression. */
|
||||
return opline->op1_type != IS_CV || opline->op1.var != cv_var;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -176,15 +176,7 @@ void zend_optimizer_pass2(zend_op_array *op_array)
|
||||
/* JMPNZ(X, L1), JMP(L2) => JMPZNZ(X, L2, L1) */
|
||||
if (ZEND_OP2_JMP_ADDR(opline) == ZEND_OP1_JMP_ADDR(opline + 1)) {
|
||||
/* JMPZ(X, L1), JMP(L1) => NOP, JMP(L1) */
|
||||
if (opline->op1_type == IS_CV) {
|
||||
opline->opcode = ZEND_CHECK_VAR;
|
||||
opline->op2.num = 0;
|
||||
} else if (opline->op1_type & (IS_TMP_VAR|IS_VAR)) {
|
||||
opline->opcode = ZEND_FREE;
|
||||
opline->op2.num = 0;
|
||||
} else {
|
||||
MAKE_NOP(opline);
|
||||
}
|
||||
MAKE_NOP(opline);
|
||||
} else {
|
||||
if (opline->opcode == ZEND_JMPZ) {
|
||||
opline->extended_value = ZEND_OPLINE_TO_OFFSET(opline, ZEND_OP1_JMP_ADDR(opline + 1));
|
||||
|
||||
@@ -765,7 +765,7 @@ static void swap_blocks(block_info *a, block_info *b) {
|
||||
int zend_cfg_identify_loops(const zend_op_array *op_array, zend_cfg *cfg, uint32_t *flags) /* {{{ */
|
||||
{
|
||||
int i, j, k, n;
|
||||
int time;
|
||||
int depth, time;
|
||||
zend_basic_block *blocks = cfg->blocks;
|
||||
int *entry_times, *exit_times;
|
||||
zend_worklist work;
|
||||
@@ -855,10 +855,7 @@ int zend_cfg_identify_loops(const zend_op_array *op_array, zend_cfg *cfg, uint32
|
||||
}
|
||||
while (zend_worklist_len(&work)) {
|
||||
j = zend_worklist_pop(&work);
|
||||
while (blocks[j].loop_header >= 0) {
|
||||
j = blocks[j].loop_header;
|
||||
}
|
||||
if (j != i) {
|
||||
if (blocks[j].loop_header < 0 && j != i) {
|
||||
blocks[j].loop_header = i;
|
||||
for (k = 0; k < blocks[j].predecessors_count; k++) {
|
||||
zend_worklist_push(&work, cfg->predecessors[blocks[j].predecessor_offset + k]);
|
||||
|
||||
@@ -1712,10 +1712,7 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
|
||||
return accelerator_orig_compile_file(file_handle, type);
|
||||
}
|
||||
persistent_script = zend_accel_hash_str_find(&ZCSG(hash), key, key_length);
|
||||
} else if (UNEXPECTED(is_stream_path(file_handle->filename) && !is_cacheable_stream_path(file_handle->filename))) {
|
||||
return accelerator_orig_compile_file(file_handle, type);
|
||||
}
|
||||
|
||||
if (!persistent_script) {
|
||||
/* try to find cached script by full real path */
|
||||
zend_accel_hash_entry *bucket;
|
||||
|
||||
@@ -144,8 +144,8 @@ static int zend_shared_alloc_reattach(size_t requested_size, char **error_in)
|
||||
FILE *fp = fopen(mmap_base_file, "r");
|
||||
MEMORY_BASIC_INFORMATION info;
|
||||
|
||||
err = GetLastError();
|
||||
if (!fp) {
|
||||
err = GetLastError();
|
||||
zend_win_error_message(ACCEL_LOG_WARNING, mmap_base_file, err);
|
||||
zend_win_error_message(ACCEL_LOG_FATAL, "Unable to open base address file", err);
|
||||
*error_in="fopen";
|
||||
@@ -194,9 +194,9 @@ static int zend_shared_alloc_reattach(size_t requested_size, char **error_in)
|
||||
}
|
||||
|
||||
mapping_base = MapViewOfFileEx(memfile, FILE_MAP_ALL_ACCESS, 0, 0, 0, wanted_mapping_base);
|
||||
err = GetLastError();
|
||||
|
||||
if (mapping_base == NULL) {
|
||||
err = GetLastError();
|
||||
if (err == ERROR_INVALID_ADDRESS) {
|
||||
zend_win_error_message(ACCEL_LOG_FATAL, "Unable to reattach to base address", err);
|
||||
return ALLOC_FAILURE;
|
||||
@@ -210,7 +210,7 @@ static int zend_shared_alloc_reattach(size_t requested_size, char **error_in)
|
||||
|
||||
static int create_segments(size_t requested_size, zend_shared_segment ***shared_segments_p, int *shared_segments_count, char **error_in)
|
||||
{
|
||||
int err = 0, ret;
|
||||
int err, ret;
|
||||
zend_shared_segment *shared_segment;
|
||||
int map_retries = 0;
|
||||
void *default_mapping_base_set[] = { 0, 0 };
|
||||
@@ -232,14 +232,14 @@ static int create_segments(size_t requested_size, zend_shared_segment ***shared_
|
||||
and we have to sleep some time (until the child releases the mapping object) and retry.*/
|
||||
do {
|
||||
memfile = OpenFileMapping(FILE_MAP_WRITE, 0, create_name_with_username(ACCEL_FILEMAP_NAME));
|
||||
err = GetLastError();
|
||||
if (memfile == NULL) {
|
||||
err = GetLastError();
|
||||
break;
|
||||
}
|
||||
|
||||
ret = zend_shared_alloc_reattach(requested_size, error_in);
|
||||
err = GetLastError();
|
||||
if (ret == ALLOC_FAIL_MAPPING) {
|
||||
err = GetLastError();
|
||||
/* Mapping failed, wait for mapping object to get freed and retry */
|
||||
CloseHandle(memfile);
|
||||
memfile = NULL;
|
||||
@@ -266,9 +266,8 @@ static int create_segments(size_t requested_size, zend_shared_segment ***shared_
|
||||
*shared_segments_count = 1;
|
||||
*shared_segments_p = (zend_shared_segment **) calloc(1, sizeof(zend_shared_segment)+sizeof(void *));
|
||||
if (!*shared_segments_p) {
|
||||
err = GetLastError();
|
||||
zend_shared_alloc_unlock_win32();
|
||||
zend_win_error_message(ACCEL_LOG_FATAL, "calloc() failed", err);
|
||||
zend_win_error_message(ACCEL_LOG_FATAL, "calloc() failed", GetLastError());
|
||||
*error_in = "calloc";
|
||||
return ALLOC_FAILURE;
|
||||
}
|
||||
@@ -277,8 +276,8 @@ static int create_segments(size_t requested_size, zend_shared_segment ***shared_
|
||||
|
||||
memfile = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, requested_size,
|
||||
create_name_with_username(ACCEL_FILEMAP_NAME));
|
||||
err = GetLastError();
|
||||
if (memfile == NULL) {
|
||||
err = GetLastError();
|
||||
zend_shared_alloc_unlock_win32();
|
||||
zend_win_error_message(ACCEL_LOG_FATAL, "Unable to create file mapping", err);
|
||||
*error_in = "CreateFileMapping";
|
||||
@@ -312,8 +311,8 @@ static int create_segments(size_t requested_size, zend_shared_segment ***shared_
|
||||
wanted_mapping_base++;
|
||||
} while (!mapping_base);
|
||||
|
||||
err = GetLastError();
|
||||
if (mapping_base == NULL) {
|
||||
err = GetLastError();
|
||||
zend_shared_alloc_unlock_win32();
|
||||
zend_win_error_message(ACCEL_LOG_FATAL, "Unable to create view for file mapping", err);
|
||||
*error_in = "MapViewOfFile";
|
||||
@@ -321,8 +320,8 @@ static int create_segments(size_t requested_size, zend_shared_segment ***shared_
|
||||
} else {
|
||||
char *mmap_base_file = get_mmap_base_file();
|
||||
FILE *fp = fopen(mmap_base_file, "w");
|
||||
err = GetLastError();
|
||||
if (!fp) {
|
||||
err = GetLastError();
|
||||
zend_shared_alloc_unlock_win32();
|
||||
zend_win_error_message(ACCEL_LOG_WARNING, mmap_base_file, err);
|
||||
zend_win_error_message(ACCEL_LOG_FATAL, "Unable to write base address", err);
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
--TEST--
|
||||
Bug #74431 - foreach infinite loop
|
||||
--INI--
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
opcache.optimization_level=0xffffffff
|
||||
--FILE--
|
||||
<?php
|
||||
function test(){
|
||||
$arr = [1,2];
|
||||
$j = 0;
|
||||
$cond = true;
|
||||
foreach ($arr as $i => $v){
|
||||
while(1){
|
||||
if($cond){
|
||||
break;
|
||||
}
|
||||
}
|
||||
$j++;
|
||||
echo $j."\n";
|
||||
if ($j>10) break;
|
||||
}
|
||||
}
|
||||
test();
|
||||
?>
|
||||
--EXPECT--
|
||||
1
|
||||
2
|
||||
@@ -1,39 +0,0 @@
|
||||
--TEST--
|
||||
Bug #74442: Opcached version produces a nested array
|
||||
--CREDITS--
|
||||
Eric Norris <erictnorris@gmail.com>
|
||||
--FILE--
|
||||
<?php
|
||||
class Schema_Base {
|
||||
public function addField($typeclass, array $params = null) {
|
||||
$field = new $typeclass($params);
|
||||
return $field;
|
||||
}
|
||||
}
|
||||
|
||||
class Field_Base {
|
||||
public function __construct(array $params = null) {
|
||||
if (! is_array($params)) {
|
||||
$params = (array) $params;
|
||||
}
|
||||
call_user_func_array(array($this, 'acceptParams'), $params);
|
||||
}
|
||||
}
|
||||
|
||||
class Field_Integer extends Field_Base {
|
||||
protected function acceptParams($bytes = 4) {
|
||||
echo print_r($bytes, true);
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
$schema = new Schema_Base;
|
||||
$schema->addField('Field_Integer');
|
||||
} catch (Throwable $ex) {
|
||||
echo "CAUGHT EXCEPTION";
|
||||
echo (string)$ex;
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
4
|
||||
@@ -1,24 +0,0 @@
|
||||
--TEST--
|
||||
Bug #74456 (Segmentation error while running a script in CLI mode)
|
||||
--INI--
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
opcache.optimization_level=-1
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
function small_numbers() {
|
||||
return [0,1,2];
|
||||
}
|
||||
|
||||
list ($zero, $one, $two) = small_numbers();
|
||||
|
||||
var_dump($zero, $one, $two);
|
||||
?>
|
||||
--EXPECT--
|
||||
int(0)
|
||||
int(1)
|
||||
int(2)
|
||||
@@ -1,55 +0,0 @@
|
||||
--TEST--
|
||||
Bug #74596 (SIGSEGV with opcache.revalidate_path enabled)
|
||||
--INI--
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
opcache.file_update_protection=0
|
||||
opcache.validate_timestamps=0
|
||||
opcache.file_cache_only=0
|
||||
opcache.revalidate_path=1
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
file_put_contents(__DIR__ . "/bug74596_1.php", <<<CODE
|
||||
<?php
|
||||
class A {
|
||||
public function __construct() {
|
||||
\$a = true;
|
||||
if (\$a) {
|
||||
echo 1 + 2;
|
||||
} else {
|
||||
echo 2 + 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
CODE
|
||||
);
|
||||
|
||||
file_put_contents(__DIR__ . "/bug74596_2.php", "ok\n");
|
||||
|
||||
class ufilter extends php_user_filter
|
||||
{
|
||||
function filter($in, $out, &$consumed, $closing)
|
||||
{
|
||||
include_once __DIR__ . "/bug74596_1.php";
|
||||
while ($bucket = stream_bucket_make_writeable($in)) {
|
||||
stream_bucket_append($out, $bucket);
|
||||
}
|
||||
return PSFS_PASS_ON;
|
||||
}
|
||||
}
|
||||
|
||||
stream_filter_register("ufilter", "ufilter");
|
||||
|
||||
include "php://filter/read=ufilter/resource=" . __DIR__ . "/bug74596_2.php";
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
unlink(__DIR__ . "/bug74596_1.php");
|
||||
unlink(__DIR__ . "/bug74596_2.php");
|
||||
?>
|
||||
--EXPECT--
|
||||
ok
|
||||
@@ -1,16 +0,0 @@
|
||||
--TEST--
|
||||
Edge-cases in elimination of JMPZ JMP with same target
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$foo = "foo";
|
||||
if ($foo . "bar") { goto label; }
|
||||
label:
|
||||
if ($undef) { goto label2; }
|
||||
label2:
|
||||
echo "done\n";
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Notice: Undefined variable: undef in %s on line %d
|
||||
done
|
||||
@@ -1,14 +0,0 @@
|
||||
--TEST--
|
||||
Literal compaction should take method calls on literals into account
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
try {
|
||||
(42)->foo();
|
||||
} catch (Error $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
Call to a member function foo() on integer
|
||||
@@ -1,7 +1,7 @@
|
||||
// $Id$
|
||||
// vim:ft=javascript
|
||||
|
||||
ARG_WITH("openssl", "OpenSSL support", "no,shared");
|
||||
ARG_WITH("openssl", "OpenSSL support", "no");
|
||||
|
||||
if (PHP_OPENSSL != "no") {
|
||||
var ret = SETUP_OPENSSL("openssl", PHP_OPENSSL);
|
||||
|
||||
+53
-84
@@ -811,9 +811,7 @@ struct php_x509_request { /* {{{ */
|
||||
/* }}} */
|
||||
|
||||
static X509 * php_openssl_x509_from_zval(zval * val, int makeresource, zend_resource **resourceval);
|
||||
static EVP_PKEY * php_openssl_evp_from_zval(
|
||||
zval * val, int public_key, char *passphrase, size_t passphrase_len,
|
||||
int makeresource, zend_resource **resourceval);
|
||||
static EVP_PKEY * php_openssl_evp_from_zval(zval * val, int public_key, char * passphrase, int makeresource, zend_resource **resourceval);
|
||||
static int php_openssl_is_private_key(EVP_PKEY* pkey);
|
||||
static X509_STORE * setup_verify(zval * calist);
|
||||
static STACK_OF(X509) * load_all_certs_from_file(char *certfile);
|
||||
@@ -912,26 +910,23 @@ static time_t asn1_time_to_time_t(ASN1_UTCTIME * timestr) /* {{{ */
|
||||
char * strbuf;
|
||||
char * thestr;
|
||||
long gmadjust = 0;
|
||||
size_t timestr_len;
|
||||
|
||||
if (ASN1_STRING_type(timestr) != V_ASN1_UTCTIME && ASN1_STRING_type(timestr) != V_ASN1_GENERALIZEDTIME) {
|
||||
php_error_docref(NULL, E_WARNING, "illegal ASN1 data type for timestamp");
|
||||
return (time_t)-1;
|
||||
}
|
||||
|
||||
timestr_len = (size_t)ASN1_STRING_length(timestr);
|
||||
|
||||
if (timestr_len != strlen((const char*)ASN1_STRING_data(timestr))) {
|
||||
if ((size_t)ASN1_STRING_length(timestr) != strlen((const char*)ASN1_STRING_data(timestr))) {
|
||||
php_error_docref(NULL, E_WARNING, "illegal length in timestamp");
|
||||
return (time_t)-1;
|
||||
}
|
||||
|
||||
if (timestr_len < 13 && timestr_len != 11) {
|
||||
if (ASN1_STRING_length(timestr) < 13) {
|
||||
php_error_docref(NULL, E_WARNING, "unable to parse time string %s correctly", timestr->data);
|
||||
return (time_t)-1;
|
||||
}
|
||||
|
||||
if (ASN1_STRING_type(timestr) == V_ASN1_GENERALIZEDTIME && timestr_len < 15) {
|
||||
if (ASN1_STRING_type(timestr) == V_ASN1_GENERALIZEDTIME && ASN1_STRING_length(timestr) < 15) {
|
||||
php_error_docref(NULL, E_WARNING, "unable to parse time string %s correctly", timestr->data);
|
||||
return (time_t)-1;
|
||||
}
|
||||
@@ -942,15 +937,11 @@ static time_t asn1_time_to_time_t(ASN1_UTCTIME * timestr) /* {{{ */
|
||||
|
||||
/* we work backwards so that we can use atoi more easily */
|
||||
|
||||
thestr = strbuf + timestr_len - 3;
|
||||
thestr = strbuf + ASN1_STRING_length(timestr) - 3;
|
||||
|
||||
if (timestr_len == 11) {
|
||||
thetime.tm_sec = 0;
|
||||
} else {
|
||||
thetime.tm_sec = atoi(thestr);
|
||||
*thestr = '\0';
|
||||
thestr -= 2;
|
||||
}
|
||||
thetime.tm_sec = atoi(thestr);
|
||||
*thestr = '\0';
|
||||
thestr -= 2;
|
||||
thetime.tm_min = atoi(thestr);
|
||||
*thestr = '\0';
|
||||
thestr -= 2;
|
||||
@@ -987,7 +978,7 @@ static time_t asn1_time_to_time_t(ASN1_UTCTIME * timestr) /* {{{ */
|
||||
** the value of timezone - 3600 seconds. Otherwise, we need to overcorrect and
|
||||
** set the adjustment to the main timezone + 3600 seconds.
|
||||
*/
|
||||
gmadjust = -(thetime.tm_isdst ? (long)timezone - 3600 : (long)timezone);
|
||||
gmadjust = -(thetime.tm_isdst ? (long)timezone - 3600 : (long)timezone + 3600);
|
||||
#endif
|
||||
ret += gmadjust;
|
||||
|
||||
@@ -1786,8 +1777,7 @@ PHP_FUNCTION(openssl_spki_new)
|
||||
}
|
||||
RETVAL_FALSE;
|
||||
|
||||
PHP_OPENSSL_CHECK_SIZE_T_TO_INT(challenge_len, challenge);
|
||||
pkey = php_openssl_evp_from_zval(zpkey, 0, challenge, challenge_len, 1, &keyresource);
|
||||
pkey = php_openssl_evp_from_zval(zpkey, 0, challenge, 1, &keyresource);
|
||||
|
||||
if (pkey == NULL) {
|
||||
php_error_docref(NULL, E_WARNING, "Unable to use supplied private key");
|
||||
@@ -2183,7 +2173,7 @@ PHP_FUNCTION(openssl_x509_check_private_key)
|
||||
if (cert == NULL) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
key = php_openssl_evp_from_zval(zkey, 0, "", 0, 1, &keyresource);
|
||||
key = php_openssl_evp_from_zval(zkey, 0, "", 1, &keyresource);
|
||||
if (key) {
|
||||
RETVAL_BOOL(X509_check_private_key(cert, key));
|
||||
}
|
||||
@@ -2772,7 +2762,7 @@ PHP_FUNCTION(openssl_pkcs12_export_to_file)
|
||||
php_error_docref(NULL, E_WARNING, "cannot get cert from parameter 1");
|
||||
return;
|
||||
}
|
||||
priv_key = php_openssl_evp_from_zval(zpkey, 0, "", 0, 1, &keyresource);
|
||||
priv_key = php_openssl_evp_from_zval(zpkey, 0, "", 1, &keyresource);
|
||||
if (priv_key == NULL) {
|
||||
php_error_docref(NULL, E_WARNING, "cannot get private key from parameter 3");
|
||||
goto cleanup;
|
||||
@@ -2859,7 +2849,7 @@ PHP_FUNCTION(openssl_pkcs12_export)
|
||||
php_error_docref(NULL, E_WARNING, "cannot get cert from parameter 1");
|
||||
return;
|
||||
}
|
||||
priv_key = php_openssl_evp_from_zval(zpkey, 0, "", 0, 1, &keyresource);
|
||||
priv_key = php_openssl_evp_from_zval(zpkey, 0, "", 1, &keyresource);
|
||||
if (priv_key == NULL) {
|
||||
php_error_docref(NULL, E_WARNING, "cannot get private key from parameter 3");
|
||||
goto cleanup;
|
||||
@@ -2941,7 +2931,6 @@ PHP_FUNCTION(openssl_pkcs12_read)
|
||||
|
||||
if (d2i_PKCS12_bio(bio_in, &p12) && PKCS12_parse(p12, pass, &pkey, &cert, &ca)) {
|
||||
BIO * bio_out;
|
||||
int cert_num;
|
||||
|
||||
zval_dtor(zout);
|
||||
array_init(zout);
|
||||
@@ -2972,11 +2961,10 @@ PHP_FUNCTION(openssl_pkcs12_read)
|
||||
BIO_free(bio_out);
|
||||
}
|
||||
|
||||
cert_num = sk_X509_num(ca);
|
||||
if (ca && cert_num) {
|
||||
if (ca && sk_X509_num(ca)) {
|
||||
array_init(&zextracerts);
|
||||
|
||||
for (i = 0; i < cert_num; i++) {
|
||||
for (i = 0; i < sk_X509_num(ca); i++) {
|
||||
zval zextracert;
|
||||
X509* aCA = sk_X509_pop(ca);
|
||||
if (!aCA) break;
|
||||
@@ -3366,7 +3354,7 @@ PHP_FUNCTION(openssl_csr_sign)
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
priv_key = php_openssl_evp_from_zval(zpkey, 0, "", 0, 1, &keyresource);
|
||||
priv_key = php_openssl_evp_from_zval(zpkey, 0, "", 1, &keyresource);
|
||||
if (priv_key == NULL) {
|
||||
php_error_docref(NULL, E_WARNING, "cannot get private key from parameter 3");
|
||||
goto cleanup;
|
||||
@@ -3499,7 +3487,7 @@ PHP_FUNCTION(openssl_csr_new)
|
||||
if (PHP_SSL_REQ_PARSE(&req, args) == SUCCESS) {
|
||||
/* Generate or use a private key */
|
||||
if (Z_TYPE_P(out_pkey) != IS_NULL) {
|
||||
req.priv_key = php_openssl_evp_from_zval(out_pkey, 0, NULL, 0, 0, &key_resource);
|
||||
req.priv_key = php_openssl_evp_from_zval(out_pkey, 0, NULL, 0, &key_resource);
|
||||
if (req.priv_key != NULL) {
|
||||
we_made_the_key = 0;
|
||||
}
|
||||
@@ -3642,27 +3630,6 @@ PHP_FUNCTION(openssl_csr_get_public_key)
|
||||
|
||||
/* {{{ EVP Public/Private key functions */
|
||||
|
||||
struct php_openssl_pem_password {
|
||||
char *key;
|
||||
int len;
|
||||
};
|
||||
|
||||
/* {{{ php_openssl_pem_password_cb */
|
||||
static int php_openssl_pem_password_cb(char *buf, int size, int rwflag, void *userdata)
|
||||
{
|
||||
struct php_openssl_pem_password *password = userdata;
|
||||
|
||||
if (password == NULL || password->key == NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
size = (password->len > size) ? size : password->len;
|
||||
memcpy(buf, password->key, size);
|
||||
|
||||
return size;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ php_openssl_evp_from_zval
|
||||
Given a zval, coerce it into a EVP_PKEY object.
|
||||
It can be:
|
||||
@@ -3676,9 +3643,7 @@ static int php_openssl_pem_password_cb(char *buf, int size, int rwflag, void *us
|
||||
empty string rather than NULL for the passphrase - NULL causes a passphrase prompt to be emitted in
|
||||
the Apache error log!
|
||||
*/
|
||||
static EVP_PKEY * php_openssl_evp_from_zval(
|
||||
zval * val, int public_key, char *passphrase, size_t passphrase_len,
|
||||
int makeresource, zend_resource **resourceval)
|
||||
static EVP_PKEY * php_openssl_evp_from_zval(zval * val, int public_key, char * passphrase, int makeresource, zend_resource **resourceval)
|
||||
{
|
||||
EVP_PKEY * key = NULL;
|
||||
X509 * cert = NULL;
|
||||
@@ -3710,12 +3675,10 @@ static EVP_PKEY * php_openssl_evp_from_zval(
|
||||
|
||||
if (Z_TYPE_P(zphrase) == IS_STRING) {
|
||||
passphrase = Z_STRVAL_P(zphrase);
|
||||
passphrase_len = Z_STRLEN_P(zphrase);
|
||||
} else {
|
||||
ZVAL_COPY(&tmp, zphrase);
|
||||
convert_to_string(&tmp);
|
||||
passphrase = Z_STRVAL(tmp);
|
||||
passphrase_len = Z_STRLEN(tmp);
|
||||
}
|
||||
|
||||
/* now set val to be the key param and continue */
|
||||
@@ -3815,14 +3778,7 @@ static EVP_PKEY * php_openssl_evp_from_zval(
|
||||
if (in == NULL) {
|
||||
TMP_CLEAN;
|
||||
}
|
||||
if (passphrase == NULL) {
|
||||
key = PEM_read_bio_PrivateKey(in, NULL, NULL, NULL);
|
||||
} else {
|
||||
struct php_openssl_pem_password password;
|
||||
password.key = passphrase;
|
||||
password.len = passphrase_len;
|
||||
key = PEM_read_bio_PrivateKey(in, NULL, php_openssl_pem_password_cb, &password);
|
||||
}
|
||||
key = PEM_read_bio_PrivateKey(in, NULL,NULL, passphrase);
|
||||
BIO_free(in);
|
||||
}
|
||||
}
|
||||
@@ -3907,8 +3863,13 @@ static EVP_PKEY * php_openssl_generate_private_key(struct php_x509_request * req
|
||||
case OPENSSL_KEYTYPE_DSA:
|
||||
PHP_OPENSSL_RAND_ADD_TIME();
|
||||
{
|
||||
DSA *dsaparam = DSA_new();
|
||||
if (dsaparam && DSA_generate_parameters_ex(dsaparam, req->priv_key_bits, NULL, 0, NULL, NULL, NULL)) {
|
||||
DSA *dsaparam = NULL;
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10002000L
|
||||
dsaparam = DSA_generate_parameters(req->priv_key_bits, NULL, 0, NULL, NULL, NULL, NULL);
|
||||
#else
|
||||
DSA_generate_parameters_ex(dsaparam, req->priv_key_bits, NULL, 0, NULL, NULL, NULL);
|
||||
#endif
|
||||
if (dsaparam) {
|
||||
DSA_set_method(dsaparam, DSA_get_default_method());
|
||||
if (DSA_generate_key(dsaparam)) {
|
||||
if (EVP_PKEY_assign_DSA(req->priv_key, dsaparam)) {
|
||||
@@ -3931,8 +3892,13 @@ static EVP_PKEY * php_openssl_generate_private_key(struct php_x509_request * req
|
||||
PHP_OPENSSL_RAND_ADD_TIME();
|
||||
{
|
||||
int codes = 0;
|
||||
DH *dhparam = DH_new();
|
||||
if (dhparam && DH_generate_parameters_ex(dhparam, req->priv_key_bits, 2, NULL)) {
|
||||
DH *dhparam = NULL;
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10002000L
|
||||
dhparam = DH_generate_parameters(req->priv_key_bits, 2, NULL, NULL);
|
||||
#else
|
||||
DH_generate_parameters_ex(dhparam, req->priv_key_bits, 2, NULL);
|
||||
#endif
|
||||
if (dhparam) {
|
||||
DH_set_method(dhparam, DH_get_default_method());
|
||||
if (DH_check(dhparam, &codes) && codes == 0 && DH_generate_key(dhparam)) {
|
||||
if (EVP_PKEY_assign_DH(req->priv_key, dhparam)) {
|
||||
@@ -4470,7 +4436,8 @@ PHP_FUNCTION(openssl_pkey_export_to_file)
|
||||
RETVAL_FALSE;
|
||||
|
||||
PHP_OPENSSL_CHECK_SIZE_T_TO_INT(passphrase_len, passphrase);
|
||||
key = php_openssl_evp_from_zval(zpkey, 0, passphrase, passphrase_len, 0, &key_resource);
|
||||
|
||||
key = php_openssl_evp_from_zval(zpkey, 0, passphrase, 0, &key_resource);
|
||||
|
||||
if (key == NULL) {
|
||||
php_error_docref(NULL, E_WARNING, "cannot get key from parameter 1");
|
||||
@@ -4551,7 +4518,8 @@ PHP_FUNCTION(openssl_pkey_export)
|
||||
RETVAL_FALSE;
|
||||
|
||||
PHP_OPENSSL_CHECK_SIZE_T_TO_INT(passphrase_len, passphrase);
|
||||
key = php_openssl_evp_from_zval(zpkey, 0, passphrase, passphrase_len, 0, &key_resource);
|
||||
|
||||
key = php_openssl_evp_from_zval(zpkey, 0, passphrase, 0, &key_resource);
|
||||
|
||||
if (key == NULL) {
|
||||
php_error_docref(NULL, E_WARNING, "cannot get key from parameter 1");
|
||||
@@ -4621,7 +4589,7 @@ PHP_FUNCTION(openssl_pkey_get_public)
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &cert) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
pkey = php_openssl_evp_from_zval(cert, 1, NULL, 0, 1, &res);
|
||||
pkey = php_openssl_evp_from_zval(cert, 1, NULL, 1, &res);
|
||||
if (pkey == NULL) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@@ -4660,9 +4628,7 @@ PHP_FUNCTION(openssl_pkey_get_private)
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|s", &cert, &passphrase, &passphrase_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
PHP_OPENSSL_CHECK_SIZE_T_TO_INT(passphrase_len, passphrase);
|
||||
pkey = php_openssl_evp_from_zval(cert, 0, passphrase, passphrase_len, 1, &res);
|
||||
pkey = php_openssl_evp_from_zval(cert, 0, passphrase, 1, &res);
|
||||
|
||||
if (pkey == NULL) {
|
||||
RETURN_FALSE;
|
||||
@@ -5254,7 +5220,7 @@ PHP_FUNCTION(openssl_pkcs7_sign)
|
||||
}
|
||||
}
|
||||
|
||||
privkey = php_openssl_evp_from_zval(zprivkey, 0, "", 0, 0, &keyresource);
|
||||
privkey = php_openssl_evp_from_zval(zprivkey, 0, "", 0, &keyresource);
|
||||
if (privkey == NULL) {
|
||||
php_error_docref(NULL, E_WARNING, "error getting private key");
|
||||
goto clean_exit;
|
||||
@@ -5363,7 +5329,7 @@ PHP_FUNCTION(openssl_pkcs7_decrypt)
|
||||
goto clean_exit;
|
||||
}
|
||||
|
||||
key = php_openssl_evp_from_zval(recipkey ? recipkey : recipcert, 0, "", 0, 0, &keyresval);
|
||||
key = php_openssl_evp_from_zval(recipkey ? recipkey : recipcert, 0, "", 0, &keyresval);
|
||||
if (key == NULL) {
|
||||
php_error_docref(NULL, E_WARNING, "unable to get private key");
|
||||
goto clean_exit;
|
||||
@@ -5430,7 +5396,7 @@ PHP_FUNCTION(openssl_private_encrypt)
|
||||
}
|
||||
RETVAL_FALSE;
|
||||
|
||||
pkey = php_openssl_evp_from_zval(key, 0, "", 0, 0, &keyresource);
|
||||
pkey = php_openssl_evp_from_zval(key, 0, "", 0, &keyresource);
|
||||
|
||||
if (pkey == NULL) {
|
||||
php_error_docref(NULL, E_WARNING, "key param is not a valid private key");
|
||||
@@ -5493,7 +5459,7 @@ PHP_FUNCTION(openssl_private_decrypt)
|
||||
}
|
||||
RETVAL_FALSE;
|
||||
|
||||
pkey = php_openssl_evp_from_zval(key, 0, "", 0, 0, &keyresource);
|
||||
pkey = php_openssl_evp_from_zval(key, 0, "", 0, &keyresource);
|
||||
if (pkey == NULL) {
|
||||
php_error_docref(NULL, E_WARNING, "key parameter is not a valid private key");
|
||||
RETURN_FALSE;
|
||||
@@ -5561,7 +5527,7 @@ PHP_FUNCTION(openssl_public_encrypt)
|
||||
return;
|
||||
RETVAL_FALSE;
|
||||
|
||||
pkey = php_openssl_evp_from_zval(key, 1, NULL, 0, 0, &keyresource);
|
||||
pkey = php_openssl_evp_from_zval(key, 1, NULL, 0, &keyresource);
|
||||
if (pkey == NULL) {
|
||||
php_error_docref(NULL, E_WARNING, "key parameter is not a valid public key");
|
||||
RETURN_FALSE;
|
||||
@@ -5624,7 +5590,7 @@ PHP_FUNCTION(openssl_public_decrypt)
|
||||
}
|
||||
RETVAL_FALSE;
|
||||
|
||||
pkey = php_openssl_evp_from_zval(key, 1, NULL, 0, 0, &keyresource);
|
||||
pkey = php_openssl_evp_from_zval(key, 1, NULL, 0, &keyresource);
|
||||
if (pkey == NULL) {
|
||||
php_error_docref(NULL, E_WARNING, "key parameter is not a valid public key");
|
||||
RETURN_FALSE;
|
||||
@@ -5724,7 +5690,7 @@ PHP_FUNCTION(openssl_sign)
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz/z|z", &data, &data_len, &signature, &key, &method) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
pkey = php_openssl_evp_from_zval(key, 0, "", 0, 0, &keyresource);
|
||||
pkey = php_openssl_evp_from_zval(key, 0, "", 0, &keyresource);
|
||||
if (pkey == NULL) {
|
||||
php_error_docref(NULL, E_WARNING, "supplied key param cannot be coerced into a private key");
|
||||
RETURN_FALSE;
|
||||
@@ -5810,7 +5776,7 @@ PHP_FUNCTION(openssl_verify)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
pkey = php_openssl_evp_from_zval(key, 1, NULL, 0, 0, &keyresource);
|
||||
pkey = php_openssl_evp_from_zval(key, 1, NULL, 0, &keyresource);
|
||||
if (pkey == NULL) {
|
||||
php_error_docref(NULL, E_WARNING, "supplied key param cannot be coerced into a public key");
|
||||
RETURN_FALSE;
|
||||
@@ -5890,7 +5856,7 @@ PHP_FUNCTION(openssl_seal)
|
||||
/* get the public keys we are using to seal this data */
|
||||
i = 0;
|
||||
ZEND_HASH_FOREACH_VAL(pubkeysht, pubkey) {
|
||||
pkeys[i] = php_openssl_evp_from_zval(pubkey, 1, NULL, 0, 0, &key_resources[i]);
|
||||
pkeys[i] = php_openssl_evp_from_zval(pubkey, 1, NULL, 0, &key_resources[i]);
|
||||
if (pkeys[i] == NULL) {
|
||||
php_error_docref(NULL, E_WARNING, "not a public key (%dth member of pubkeys)", i+1);
|
||||
RETVAL_FALSE;
|
||||
@@ -5924,6 +5890,7 @@ PHP_FUNCTION(openssl_seal)
|
||||
|
||||
if (len1 + len2 > 0) {
|
||||
zval_dtor(sealdata);
|
||||
buf[len1 + len2] = '\0';
|
||||
ZVAL_NEW_STR(sealdata, zend_string_init((char*)buf, len1 + len2, 0));
|
||||
efree(buf);
|
||||
|
||||
@@ -5986,7 +5953,7 @@ PHP_FUNCTION(openssl_open)
|
||||
return;
|
||||
}
|
||||
|
||||
pkey = php_openssl_evp_from_zval(privkey, 0, "", 0, 0, &keyresource);
|
||||
pkey = php_openssl_evp_from_zval(privkey, 0, "", 0, &keyresource);
|
||||
if (pkey == NULL) {
|
||||
php_error_docref(NULL, E_WARNING, "unable to coerce parameter 4 into a private key");
|
||||
RETURN_FALSE;
|
||||
@@ -6216,7 +6183,9 @@ static int php_openssl_validate_iv(char **piv, size_t *piv_len, size_t iv_requir
|
||||
|
||||
if (mode->is_aead) {
|
||||
if (EVP_CIPHER_CTX_ctrl(cipher_ctx, mode->aead_ivlen_flag, *piv_len, NULL) != 1) {
|
||||
php_error_docref(NULL, E_WARNING, "Setting of IV length for AEAD mode failed");
|
||||
php_error_docref(NULL, E_WARNING,
|
||||
"Setting of IV length for AEAD mode failed, the expected length is %zd bytes",
|
||||
iv_required_len);
|
||||
return FAILURE;
|
||||
}
|
||||
return SUCCESS;
|
||||
|
||||
@@ -10,7 +10,7 @@ if (OPENSSL_VERSION_NUMBER < 0x009070af) die("skip");
|
||||
$configargs = array(
|
||||
"req_extensions" => "v3_req",
|
||||
"x509_extensions" => "usr_cert",
|
||||
"config" => __DIR__. DIRECTORY_SEPARATOR . "openssl.cnf",
|
||||
"config" => __DIR__."/openssl.cnf",
|
||||
);
|
||||
|
||||
$dn = array(
|
||||
|
||||
@@ -19,7 +19,7 @@ $csr_info = array(
|
||||
$private = openssl_pkey_new($config);
|
||||
while (openssl_error_string()) {}
|
||||
$csr_res = openssl_csr_new($csr_info, $private,
|
||||
['config' => __DIR__. DIRECTORY_SEPARATOR . "openssl.cnf"]);
|
||||
['config' => __DIR__."/openssl.cnf"]);
|
||||
if (!$csr_res) {
|
||||
while ($e = openssl_error_string()) { $err = $e; }
|
||||
die("Failed; last error: $err");
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
[ req ]
|
||||
default_bits = 384
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
--TEST--
|
||||
Bug #73711: Segfault in openssl_pkey_new when generating DSA or DH key
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("openssl")) die("skip openssl not loaded");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$cnf = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'bug73711.cnf';
|
||||
var_dump(openssl_pkey_new(["private_key_type" => OPENSSL_KEYTYPE_DSA, 'config' => $cnf]));
|
||||
var_dump(openssl_pkey_new(["private_key_type" => OPENSSL_KEYTYPE_DH, 'config' => $cnf]));
|
||||
echo "DONE";
|
||||
?>
|
||||
--EXPECTF--
|
||||
resource(%d) of type (OpenSSL key)
|
||||
resource(%d) of type (OpenSSL key)
|
||||
DONE
|
||||
@@ -1,31 +0,0 @@
|
||||
--TEST--
|
||||
Bug #73833: null character not allowed in openssl_pkey_get_private
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("openssl")) die("skip openssl not loaded");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$passwords = ["abc\x00defghijkl", "abcdefghikjl"];
|
||||
$conf = ['config' => __DIR__ . DIRECTORY_SEPARATOR . 'openssl.cnf'];
|
||||
|
||||
foreach($passwords as $password) {
|
||||
$key = openssl_pkey_new($conf);
|
||||
|
||||
if (openssl_pkey_export($key, $privatePEM, $password, $conf) === false) {
|
||||
echo "Failed to encrypt.\n";
|
||||
} else {
|
||||
echo "Encrypted!\n";
|
||||
}
|
||||
if (openssl_pkey_get_private($privatePEM, $password) === false) {
|
||||
echo "Failed to decrypt.\n";
|
||||
} else {
|
||||
echo "Decrypted!\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
Encrypted!
|
||||
Decrypted!
|
||||
Encrypted!
|
||||
Decrypted!
|
||||
@@ -1,24 +0,0 @@
|
||||
--TEST--
|
||||
Bug #74022 PHP Fast CGI crashes when reading from a pfx file with valid password, multiple extra certs
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("openssl")) die("skip");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
function test($p12_contents, $password) {
|
||||
openssl_pkcs12_read($p12_contents, $cert_data, $password);
|
||||
openssl_error_string();
|
||||
var_dump(count($cert_data['extracerts']));
|
||||
}
|
||||
|
||||
$p12_base64 = 'MIIW+QIBAzCCFr8GCSqGSIb3DQEHAaCCFrAEghasMIIWqDCCEV8GCSqGSIb3DQEHBqCCEVAwghFMAgEAMIIRRQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIQOfCxIAgGIICAggAgIIRGFTkvHpJjCtFjukXYVlhyOIqKiS8Zvg84dX244hhI0S51Uyn/tlXM2GD/3hDNVxcVKwP/fKN21lEkoXoK4h2/5BY3qCdZa3Ef3vk44b/+FGCUAqvsOo1ZjD2P/sBGhLu3aFnQ6ktUXlKV4cnqhlF62AqY4e5efQzmJXn+gI8cSNI5c+qQ0RQgGoRY4nJfvMSZG0/DAkirjGikU/2TZd8LwLkxVUBYbF5/T0fNtA3o99+4tF+8ZRv6ArYjplRdwcBbMbzGhn3ytCq6cmVid9iLjwHJFmvAPXKbmu0Lh5eRRznX9gBWlzGd08Q/ch0MW2ehZTu1A2VrNWl+FKWSk8l0MlSoTPJFutFiejRvMr6VzbQItyJ/mtrNa9b1Hicgoj9HaBB6arx4wKORlbSOxFNOWdTCUhFdqthK5o7b9i/owyVgyY0s7BFEZChc0zGpRq7BLrynY79b+pHKzpil9isuisp1++piHZx9Y/bpC7OP5FlYF9+3TJL0EpEFQD8FqEoqcMFRxIDWGpCQiLGcmL14OH1JKSgOJEAgogsIF/KQhvWeKcUSJlai+0sskl8mOrCt2EJwuRvzmemuzebYN3JMOiBXKONYR0yU8AeAyNTgSBimWhACtikUyfpgZXlIeXyFMvj9fmd0I/zqjaW4upqrCudCOj/CWx7+e+8udfJxI7agWwrZMf1BEkOhRFOHOIuV+IEbaoMP6vVrGlhK71oN+gnoes5ivohpFDJWSZ3+1fMh56vfNynuM2wLJO7FTROPla+4ug33V/2ubGpoIyXn2lTSbuXaYDfsXMa1inakOMW9Q+PHGdIjZrwQU/u9Q2H0IlwFd4uQojZo15SRf4xh5FOuUrrfGRAnp1mWHALTBqd2VnkgqtBl8rXZXqA+CiEhEDhTAQmvf+wCKd3FklrhV+p65YcfRK9OJv5aFQM1/+WbJozF4/Wi5j4rtIDPrgMMEflOyoZIxGxDOaklyAvaasRU2TT8E2LIEvGKOzlrhIZqWyRESjgXdh6l0UBMaVAidIZ0JLf+8fqSZ0Zia5iAaJpm82MQr/PVXC4lqqxDlHhefwM3OKfZVkfAw0a2eePM5YkIxAgMpAstBt32UIixlj/5l4MwqzP8Reb4MsV6Fph2e14vsV1diLBaJI3hrU5UBVEDWV0GSbwdhZLtdubSaBHcv5v9aZ1cdFKL6d2rHksW9ooNnh/ljPxmVlfHbb8sPYDXmLmBNJdNV1gQouhKKrt0ov1J9+sqE53D9+9dfRwf/myYlnyNgqU4vNMrZI2flyugkYoUxIC8stVF46zfL5QkSg3GqdLQC4gpeJ0WdTSyOBaOgUvqGdSARb5bXm1VXF5IxVg1B4v+puNIHS9yuphXUJvw6xWWPjbQAllDrPjMqAbxmF465vFyQP0qEvMjRD+SaFIgW4KjMqfteKo4MgqKTRF4UP9r0HkwRErOznxWDfSxzXYztY6U72NdifN9IIFiBikKQqZvfvaN+1jukehSRpGQHQB5OxeeKThJZJGiUC5Fgvl7lPb6Djx8Rfba/FJvVsR2KFS64sArtUKmC6LcJxEY9WcsiJTHek817zvYej7FD1NxuttNp+ue9ArOoIhOEf08HIOu3d2yjeRlN5CJ/jIdKYlZW6m6Ap1M+OUHhJTF73K6lKKD9Diwa3s6FoqOwtZF4uYwHnCG218BMY8GgEVD73x5KjDOP02Y6EakZNp/9QIqQT4WkMWXMaqAPADtoh8X1FJLlnvs2Ko+hLlPxuPaIA4KvSuuocnWx/6HJbdqHUS/Se+JJo0Igt4Svax1R2kvoIPuQmPmHJ6l7CeZZiNbe+baFSx+V6g/6AgHUsUOSqGvUIEns1uIE9CQ8w0G3yLVonjERJLrdj+em3Pt7fxrxoOI4nwjplX0wJk0rkQREiS8ULQDHueptUcxJxMKpugAc4CL+BsHohkhm4kpOEmviKDwzxytQhDp2Fj2PRO9kqyNrNfzNGCN5709blEIVYTtonELI2vR5Ap+O2pH+AlqrnHWgeOYAKAyWT13xCNRsGNdv2sCDDiHqxq01IBzYhPvoWzECOmGbJRRSGOVzYCJJpVjl0NNKv9ucmftSQRjm6xgLIqv1xrehDYuJ/IMsYQ5QwXBGxy7nkeRg+onWzA0ZnEWgzLs3T/Pj7z/TPQWiN03MH24RvQXTWBqp9iBwXpsCZVgUIM/VLCQJn0/V5gfRy9Ne0rk2/tHMnzGHvll5Spoy6WkxSfQ8c8CjTilaoPWV6fOcNB2Z6ZuTqX0fbnxcEAu2fOK7e6ryGipEgaxrdiopDTlgPEFMdGUETbUh0ACrv/gNsS+m5MtNisWnhxFEiXrsWoWIgW/6TgRJGo+l52bh/xxC0bwHbYuHK62sxDVeXpBOnA4VE+WckWsC0CKYJvv4vfTbLI46fyd3lnlcSuHYM4SdbND7THNeK+KB5GyuUFLgAhhtZv8ceEo63IOlBUUy1NlWnr0cbidxvVnOugFLExCV5QGr+xbrssIibQxs8AfOBK8Cxh83IlzJVe7dX1mZVG1c6AM6SKSC6F0LBOeNEvcLlz4PBMIciubCE6ecdXCzJYFbj9ERDlnrZMKrnATRMsgCPaWdyYgQwkDuCj5uqf4aiKLzA61918hLY3MB7mSyJcCkXDYKr11Br0YSAdu8uG6IjpiUQS2PFz8E8XHBmO/uobhEuCPR2LnUv+xFN8zoPQlA5ueRz1yBF8L+CsvDGp/N3KF26ETWlvmnEdt7foE+o/J7aG6xO/CNB+/+yGbVPZRVAntZec9nbqlQ55qECnWtQNnShW7+3RSGamWeTtE2DyRSfd/62JkPNEY25jbBUIkMNtKolA5dbYa+u50S3lvakMmvQvzcSC3PONajKHgk4mBn3qf9X2uM5RDL83M7489r6JPcxTnNK27rQoxplkxLiN8HuB+AB5hp82WoyvLydR4hoBnJPIYKMcmEfIR+SgLoCyNIQLjzk5Iyk1ZwdwsjyNPXi1/HHZq8+NhoTCupjGfWgXghoz89MTYAjpMvOlES2rgFuCdphSc8Nd1uQtZx4CLMOU0gut0PI81ePBBI0iG74PWMEcp5HlHHY/hPTaRkBFLYkq9CWmJc1PfjiCWf3pwRmT7dUnmcptynexIMOZt2Nd76jc+g7k5MmEK+Qdz7/c1un4sVLquxdY6nUY/znLz+2zC/OTSsF39+rak3p8TXR0kBNsHl8UTioi4CGhCMsWsQy9me25TDHzbtIvBPVp9xXufsOe2wqPLjq3iNEGXTsagx3sLvl7BJ6WW/YMC7sUpjx1Ai3zkqViW0jQB+BzMZjfYM/8Yj31EEE+WssxY+NfitBgZzeMGGjNOAKp7XN0glwhuo1G2/APyU/Zopx3gMYj5OExgkZ7kvK++7+NlPmE+8AEuZ/uf30TtKwvRXOSvAMqqm26kb/WQPCj1xFQ0AEDl0Sbyfgk1E51Cd/ujL0t32FNkSoE8pe3IaTnwAnW7NHTZ/RByh2nsr0ThfFg4pFFuSD4dzU8r2J/4YJG3B06eyyTRLoyLBQwzwIgzGBAU8USdD8CXlA8SkfBbF39500ZRNcMIt6wdQa1CHAUHDLPw9JF9Q0FwCspgkjc9+lTRZMtumN5ChgypSkUB1dzLV2hqeQzDngVjcco/CoxM0Svm8gGrM9qobCTGzGF8/wZljv1yRiqu6HGFYWDAQ/p+wWx6ScstxEAB+5R5GrOedgd4zPXi2NMvyeN+ACFRBSPkhXIXpLZADvBi/WQMYbHia1wL8WUrSGQuB4P46cWGyseaxl//6GQ9IoGbK3XuLIPeE+BpPLB0H9LSLY+5f3qOEkKzCCW0z+68ZMlanlsThLKhqk8yrmJhV4788Tr7BC3eGbAie1urrrfUR613Jsp5peLSJuWQHdWCE/fdKgoSsRJ+DYkPoyS1YNz4BF4yz1Oem9Mti7gvgTQNX6g6PCu0rN8B6HIgY9TvWy5OCoZjJKasb+OgTMld7TJDnyK5/JcvDKHNVwcpK74lxcVX7IRorP/eh4IQ1+P/Gh06A62RHp2dEh/fNuKeCiRM2vGH0gdIN/Ca6MX8MqazgJq2EONyWiqRoGPqqZpAVTa8l5kgGvxQE/CQ4x0uAxwresRRTUZ+fJEanAhTWYgI5mRoEkG88UZjyCWmCnpNMQRYHoq7iY0So5qUdkHvpUA48cNMyztPEEHsUyWC36ZCyNsQN26FoJrG9TqXedBrhcki0sPOWugvKtGsdTT354wJTDe5OCo0AH3eFo/auuuAk/DF7yu614UCmKtXHYJ61GpIkjBu9WrPAIJhndMqfGMD/yU4UMEPHyojqHvU0BSgv1k76vI3K2lqERkaNYFfzRNj+e7k+NNos8w7XCzilWBL2ePB3pG5xfivcH4tYFm0FbnIkSz52VIy+PTiK7QQuBPDRTcn1k41+9vxQxRWpsqM/NP+4gqGozNyANXLQ64Y+QXSnWrD+xMjL/kVFwUBJ2HaAIJHjZ7ZqLRzXVOUbQ9pivJiBkXvLptSo72Iw4zsbRd1x8WNEaihx1MBAj+s+4MNdC5MBkQMlSB0PTJzs9xlz0gN+Oz0lohH6JO7ngPJUYbo2AIWEYZN+9kn/RyHblQTElrJeLf1jGNi4anBfzbsIXQuVm/nsrE5MH23X66+rJzUk8Fc5JAIDGBslkDPg3UNnElcE3cYbcB/ZzjFtgz8ducWKQmI+Yqv4p7BVXji/rHPim8vL6P5xZc95tbIonp5bQH+PPSmcfDk3rrf5mS58dJvWh/UpwcfdVvUAsWLJEV1lUBg1qecVbCsa6Oy7tJ2ZK7e3KdtZrmXiYpSAnSzRNJotr4g4H99brG6IwUx3qk5BE4Line truncated
|
||||
|
||||
$p12 = base64_decode($p12_base64);
|
||||
|
||||
test($p12, 'qwerty');
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
int(2)
|
||||
===DONE===
|
||||
@@ -1,52 +0,0 @@
|
||||
--TEST--
|
||||
Bug #74341 (openssl_x509_parse fails to parse ASN.1 UTCTime without seconds)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("openssl")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$pem_cert = '
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIGFDCCBPygAwIBAgIDKCHVMA0GCSqGSIb3DQEBBQUAMIHcMQswCQYDVQQGEwJV
|
||||
UzEQMA4GA1UECBMHQXJpem9uYTETMBEGA1UEBxMKU2NvdHRzZGFsZTElMCMGA1UE
|
||||
ChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjE5MDcGA1UECxMwaHR0cDov
|
||||
L2NlcnRpZmljYXRlcy5zdGFyZmllbGR0ZWNoLmNvbS9yZXBvc2l0b3J5MTEwLwYD
|
||||
VQQDEyhTdGFyZmllbGQgU2VjdXJlIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MREw
|
||||
DwYDVQQFEwgxMDY4ODQzNTAcFwsxNDAxMDcwMDAwWhcNMTYwNDAxMDcwMDAwWjCB
|
||||
6zETMBEGCysGAQQBgjc8AgEDEwJVUzEYMBYGCysGAQQBgjc8AgECEwdBcml6b25h
|
||||
MR0wGwYDVQQPExRQcml2YXRlIE9yZ2FuaXphdGlvbjEUMBIGA1UEBRMLUi0xNzI0
|
||||
NzQxLTYxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpT
|
||||
Y290dHNkYWxlMSQwIgYDVQQKExtTdGFyZmllbGQgVGVjaG5vbG9naWVzLCBMTEMx
|
||||
KzApBgNVBAMTInZhbGlkLnNmaS5jYXRlc3Quc3RhcmZpZWxkdGVjaC5jb20wggEi
|
||||
MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCt1LHQOza9tkKxwGL+/yKi/Fe5
|
||||
HM0sjvcM4ic1XVrvpewa4P/04IzGSjIGO3CXaSArxQMSzsTt2dcO9tSJ1Zk8c9NZ
|
||||
XM8eVqx92iTMEf9OQcubWpzWmrPc3TAFhbVnfEmCptsXEgtxbAIbntrNeDk/hBPd
|
||||
l4DYFYRdm3ZTk4JMIf/quDZe5Oti53J0UsxWXSSoqKyPNdb671Q+OTQfSDj7kVF4
|
||||
+Ri3FIeAV16d2UnpBW1bgNqA5yITRskHE4bX98HDNHUTHioHpgA+fXfejWkGB/0F
|
||||
QN4HbZcysYHhf1L5cWBtz9w5J00YmjM5fzWvTc3UUF9ou7m7JE4aqEbNOWb9AgMB
|
||||
AAGjggHOMIIByjAMBgNVHRMBAf8EAjAAMA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUE
|
||||
FjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwLQYDVR0RBCYwJIIidmFsaWQuc2ZpLmNh
|
||||
dGVzdC5zdGFyZmllbGR0ZWNoLmNvbTAdBgNVHQ4EFgQUcO+QEqZcHphPW9szww9t
|
||||
y+1AGmQwHwYDVR0jBBgwFoAUSUtSJ9EbvPKhIWpie1FCeorX1VYwOAYDVR0fBDEw
|
||||
LzAtoCugKYYnaHR0cDovL2NybC5zdGFyZmllbGR0ZWNoLmNvbS9zZnMzLTAuY3Js
|
||||
MIGNBggrBgEFBQcBAQSBgDB+MCoGCCsGAQUFBzABhh5odHRwOi8vb2NzcC5zdGFy
|
||||
ZmllbGR0ZWNoLmNvbS8wUAYIKwYBBQUHMAKGRGh0dHA6Ly9jZXJ0aWZpY2F0ZXMu
|
||||
c3RhcmZpZWxkdGVjaC5jb20vcmVwb3NpdG9yeS9zZl9pbnRlcm1lZGlhdGUuY3J0
|
||||
MFIGA1UdIARLMEkwRwYLYIZIAYb9bgEHFwMwODA2BggrBgEFBQcCARYqaHR0cDov
|
||||
L2NlcnRzLnN0YXJmaWVsZHRlY2guY29tL3JlcG9zaXRvcnkvMA0GCSqGSIb3DQEB
|
||||
BQUAA4IBAQAViYkLUjQkxWRmZl4DutL0/9/wJSURcJ1qunLP+TImJFp0A9RE/MNK
|
||||
ZOmQoAEoH6hMg7FL4etkvTcnruTdcx+3mvqYiECUiUEx6pkx3dmkYgZACEuk2nfy
|
||||
J0MkV/zwzqmI8aV+kunpOQv93aePZbrBgaAzkE8jDlExtd7c4pE7JF40jxmvDwjZ
|
||||
HwpyNDULreGtFBij7JcWJCfihM3uetqrao0kOoeih1PQyJXtz2RldhFYs6Jdk3IL
|
||||
Yv+84t5UMO+aS9nVBXIcbgaGjIMZjHDgR/tE9FKFB66k8UTDzAwwEs38VV24zx6h
|
||||
lOzTF7xAUxmPUnNb2teatMf2Rmj0fs+d
|
||||
-----END CERTIFICATE-----
|
||||
';
|
||||
|
||||
$parsed_cert = openssl_x509_parse($pem_cert);
|
||||
var_dump($parsed_cert['validFrom_time_t']);
|
||||
var_dump($parsed_cert['validTo_time_t']);
|
||||
?>
|
||||
--EXPECTF--
|
||||
int(1389052800)
|
||||
int(1459494000)
|
||||
@@ -1,30 +0,0 @@
|
||||
--TEST--
|
||||
Bug #74402 (segfault on random_bytes, bin3hex, openssl_seal)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("openssl")) {
|
||||
print "skip";
|
||||
}
|
||||
if (!in_array('AES256', openssl_get_cipher_methods(true))) {
|
||||
print "skip";
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$data = "23153b1cf683cb16f8d71190a7c42f38fecda27c29a7bc8991c9f6a2a63602bf";
|
||||
$key = array("-----BEGIN PUBLIC KEY-----
|
||||
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqvjCLfpS0MyilIjR+IsH
|
||||
HPH8TqFUCw4kTAVmTy9SDZV9hHYY2EPgrlTd7gvMP/DWipvBD6Y5w2bPdAQoXr5D
|
||||
qEKAGkE+1El4hS8XyuOdYXSYTDH1HPSlFiGdgsnlkFcbh/fJyzIKBaGLnWxsjhiS
|
||||
deiI7KuEkI9zt+X2r4KqFt/dhnXz0kcB1M7qyhQ6Rvijgjy/A1LsN4ZAREFLCEjb
|
||||
1AP9nk0QAUHWcG5MvbgsE20Pn4R5wFsMFBTvNmb34jHFREgR9j4DYcV5FFR3tKb8
|
||||
3XtjE9/kjfK29BSpiyXZs8PSqDhO00vh6txUB4VfkVUD2Bi93rxDeyALnCW7My+l
|
||||
YwIDAQAB
|
||||
-----END PUBLIC KEY-----");
|
||||
$iv = '';
|
||||
var_dump(strlen($data));
|
||||
var_dump(openssl_seal($data, $sealed_data, $env_keys, $key, 'AES256', $iv));
|
||||
?>
|
||||
--EXPECTF--
|
||||
int(64)
|
||||
int(80)
|
||||
@@ -1,10 +1,3 @@
|
||||
oid_section = new_oids
|
||||
|
||||
[ new_oids ]
|
||||
# Example policies to test their
|
||||
tsa_policy1 = 1.2.3.4.1
|
||||
tsa_policy2 = 1.2.3.4.5.6
|
||||
|
||||
[ req ]
|
||||
default_bits = 1024
|
||||
default_keyfile = privkey.pem
|
||||
|
||||
@@ -35,7 +35,7 @@ var_dump(openssl_decrypt($test['ct'], $method, $test['key'], OPENSSL_RAW_DATA,
|
||||
TEST 0
|
||||
bool(true)
|
||||
|
||||
Warning: openssl_decrypt(): Setting of IV length for AEAD mode failed in %s on line %d
|
||||
Warning: openssl_decrypt(): Setting of IV length for AEAD mode failed, the expected length is 12 bytes in %s on line %d
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
@@ -45,7 +45,7 @@ bool(true)
|
||||
TEST 5
|
||||
bool(true)
|
||||
|
||||
Warning: openssl_decrypt(): Setting of IV length for AEAD mode failed in %s on line %d
|
||||
Warning: openssl_decrypt(): Setting of IV length for AEAD mode failed, the expected length is 12 bytes in %s on line %d
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
@@ -33,7 +33,7 @@ TEST 0
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
Warning: openssl_encrypt(): Setting of IV length for AEAD mode failed in %s on line %d
|
||||
Warning: openssl_encrypt(): Setting of IV length for AEAD mode failed, the expected length is 12 bytes in %s on line %d
|
||||
bool(false)
|
||||
string(8) "p/lvgA=="
|
||||
int(1024)
|
||||
@@ -50,7 +50,7 @@ TEST 5
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
Warning: openssl_encrypt(): Setting of IV length for AEAD mode failed in %s on line %d
|
||||
Warning: openssl_encrypt(): Setting of IV length for AEAD mode failed, the expected length is 12 bytes in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: openssl_encrypt(): Retrieving verification tag failed in %s on line %d
|
||||
|
||||
@@ -3,6 +3,14 @@ openssl_x509_parse() tests
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("openssl")) print "skip";
|
||||
if (OPENSSL_VERSION_NUMBER < 0x10000000) die("skip Output requires OpenSSL 1.0");
|
||||
if(substr(PHP_OS, 0, 3) == 'WIN') {
|
||||
$exp = "W. Europe Standard Time";
|
||||
$cmd = "powershell -command [System.TimeZoneInfo]::Local.Id";
|
||||
$r = trim(shell_exec($cmd));
|
||||
if ($exp !== $r) {
|
||||
die("skip expect '$exp', got '$r'");
|
||||
}
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -3,7 +3,6 @@ sni_server
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("openssl")) die("skip openssl not loaded");
|
||||
if (OPENSSL_VERSION_NUMBER >= 0x10100000) die("skip OpenSSL < v1.1.0 required");
|
||||
--FILE--
|
||||
<?php
|
||||
$serverCode = <<<'CODE'
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
--TEST--
|
||||
Bug #74376 (Invalid free of persistent results on error/connection loss)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded');
|
||||
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc');
|
||||
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
|
||||
MySQLPDOTest::skip();
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
|
||||
|
||||
$attr = getenv('PDOTEST_ATTR');
|
||||
$attr = $attr ? unserialize($attr) : [];
|
||||
$attr[PDO::ATTR_PERSISTENT] = true;
|
||||
$attr[PDO::ATTR_EMULATE_PREPARES] = false;
|
||||
|
||||
putenv('PDOTEST_ATTR=' . serialize($attr));
|
||||
|
||||
$db = MySQLPDOTest::factory();
|
||||
$stmt = $db->query("select (select 1 union select 2)");
|
||||
|
||||
print "ok";
|
||||
?>
|
||||
--EXPECTF--
|
||||
ok
|
||||
@@ -3,7 +3,7 @@ PDO_sqlite: Testing sqliteCreateFunction() with flags
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('pdo_sqlite')) print 'skip not loaded';
|
||||
if (!defined('PDO::SQLITE_DETERMINISTIC')) die('skip system sqlite is too old');
|
||||
if (!defined('PDO::SQLITE_DETERMINISTIC')) die('skip system sqlite is to old');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
+2
-13
@@ -573,18 +573,7 @@ PHP_METHOD(Phar, webPhar)
|
||||
}
|
||||
|
||||
/* retrieve requested file within phar */
|
||||
if (!(SG(request_info).request_method
|
||||
&& SG(request_info).request_uri
|
||||
&& (!strcmp(SG(request_info).request_method, "GET")
|
||||
|| !strcmp(SG(request_info).request_method, "POST")
|
||||
|| !strcmp(SG(request_info).request_method, "DELETE")
|
||||
|| !strcmp(SG(request_info).request_method, "HEAD")
|
||||
|| !strcmp(SG(request_info).request_method, "OPTIONS")
|
||||
|| !strcmp(SG(request_info).request_method, "PATCH")
|
||||
|| !strcmp(SG(request_info).request_method, "PUT")
|
||||
)
|
||||
)
|
||||
) {
|
||||
if (!(SG(request_info).request_method && SG(request_info).request_uri && (!strcmp(SG(request_info).request_method, "GET") || !strcmp(SG(request_info).request_method, "POST")))) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -5145,7 +5134,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_webPhar, 0, 0, 0)
|
||||
ZEND_ARG_INFO(0, rewrites)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_running, 0, 0, 0)
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_phar_running, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, retphar)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
--TEST--
|
||||
Phar: bug #74383: Wrong reflection on Phar::running
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("phar") || !extension_loaded('reflection')) die("skip"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$rc = new ReflectionClass(Phar::class);
|
||||
$rm = $rc->getMethod("running");
|
||||
echo $rm->getNumberOfParameters();
|
||||
echo PHP_EOL;
|
||||
echo $rm->getNumberOfRequiredParameters();
|
||||
echo PHP_EOL;
|
||||
echo (int) $rm->getParameters()[0]->isOptional();
|
||||
|
||||
?>
|
||||
|
||||
--EXPECT--
|
||||
1
|
||||
0
|
||||
1
|
||||
@@ -11,7 +11,6 @@ $functions = [
|
||||
function(): bool {},
|
||||
function(): array {},
|
||||
function(): callable {},
|
||||
function(): iterable {},
|
||||
function(): StdClass {}
|
||||
];
|
||||
|
||||
@@ -29,5 +28,4 @@ string(6) "string"
|
||||
string(4) "bool"
|
||||
string(5) "array"
|
||||
string(8) "callable"
|
||||
string(8) "iterable"
|
||||
string(8) "StdClass"
|
||||
@@ -2440,10 +2440,6 @@ ZEND_BEGIN_ARG_INFO(arginfo_session_class_updateTimestamp, 0)
|
||||
ZEND_ARG_INFO(0, key)
|
||||
ZEND_ARG_INFO(0, val)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_session_start, 0, 0, 0)
|
||||
ZEND_ARG_INFO(0, options) /* array */
|
||||
ZEND_END_ARG_INFO()
|
||||
/* }}} */
|
||||
|
||||
/* {{{ session_functions[]
|
||||
@@ -2457,7 +2453,7 @@ static const zend_function_entry session_functions[] = {
|
||||
PHP_FE(session_regenerate_id, arginfo_session_regenerate_id)
|
||||
PHP_FE(session_decode, arginfo_session_decode)
|
||||
PHP_FE(session_encode, arginfo_session_void)
|
||||
PHP_FE(session_start, arginfo_session_start)
|
||||
PHP_FE(session_start, arginfo_session_void)
|
||||
PHP_FE(session_destroy, arginfo_session_void)
|
||||
PHP_FE(session_unset, arginfo_session_void)
|
||||
PHP_FE(session_gc, arginfo_session_void)
|
||||
|
||||
@@ -9,7 +9,6 @@ session.name=sid
|
||||
session.save_path=/tmp
|
||||
session.gc_probability=1
|
||||
session.gc_divisor=1
|
||||
session.save_handler=files
|
||||
--FILE--
|
||||
<?php
|
||||
error_reporting(E_ALL);
|
||||
|
||||
@@ -3,7 +3,6 @@ Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write())
|
||||
--INI--
|
||||
session.save_path=
|
||||
session.name=PHPSESSID
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--FILE--
|
||||
|
||||
@@ -3,7 +3,6 @@ Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write())
|
||||
--INI--
|
||||
session.save_path=
|
||||
session.name=PHPSESSID
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--FILE--
|
||||
|
||||
@@ -3,7 +3,6 @@ Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write())
|
||||
--INI--
|
||||
session.save_path=
|
||||
session.name=PHPSESSID
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--FILE--
|
||||
|
||||
@@ -3,7 +3,6 @@ Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write())
|
||||
--INI--
|
||||
session.save_path=
|
||||
session.name=PHPSESSID
|
||||
session.save_handler=files
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--FILE--
|
||||
|
||||
Loaded 100 of 183 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user