mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-09 10:10:50 +00:00
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d1e04d54b1 | ||
|
|
ed060799e0 | ||
|
|
c6a574126f | ||
|
|
51fe6b9ebf | ||
|
|
876a7097e6 |
No files matched your search
+7
-1
@@ -8,6 +8,12 @@ branches:
|
||||
- PHP-5.6
|
||||
- PHP-7.0
|
||||
|
||||
skip_commits:
|
||||
files:
|
||||
- NEWS
|
||||
- UPGRADING*
|
||||
- README.*
|
||||
|
||||
clone_depth: 64
|
||||
|
||||
cache:
|
||||
@@ -17,7 +23,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.1.9beta1
|
||||
PHP_BUILD_SDK_BRANCH: php-sdk-2.1.0
|
||||
# ext and env setup for tests
|
||||
#MYSQL_TEST_PASSWD: Password12!
|
||||
#MYSQL_TEST_USER: root
|
||||
|
||||
@@ -16,11 +16,9 @@ define ____executor_globals
|
||||
end
|
||||
set $eg = ((zend_executor_globals*) (*((void ***) $tsrm_ls))[executor_globals_id-1])
|
||||
set $cg = ((zend_compiler_globals*) (*((void ***) $tsrm_ls))[compiler_globals_id-1])
|
||||
set $eg_ptr = $eg
|
||||
else
|
||||
set $eg = executor_globals
|
||||
set $cg = compiler_globals
|
||||
set $eg_ptr = (zend_executor_globals*) &executor_globals
|
||||
end
|
||||
end
|
||||
|
||||
@@ -173,7 +171,7 @@ define ____printzv_contents
|
||||
printf "UNDEF"
|
||||
end
|
||||
if $type == 1
|
||||
printf "NULL"
|
||||
printf "NULL"
|
||||
end
|
||||
if $type == 2
|
||||
printf "bool: false"
|
||||
@@ -181,15 +179,15 @@ define ____printzv_contents
|
||||
if $type == 3
|
||||
printf "bool: true"
|
||||
end
|
||||
if $type == 4
|
||||
if $type == 4
|
||||
printf "long: %ld", $zvalue->value.lval
|
||||
end
|
||||
if $type == 5
|
||||
printf "double: %f", $zvalue->value.dval
|
||||
end
|
||||
if $type == 6
|
||||
printf "string: %s", $zvalue->value.str->val
|
||||
end
|
||||
end
|
||||
if $type == 5
|
||||
printf "double: %f", $zvalue->value.dval
|
||||
end
|
||||
if $type == 6
|
||||
printf "string: %s", $zvalue->value.str->val
|
||||
end
|
||||
if $type == 7
|
||||
printf "array: "
|
||||
if ! $arg1
|
||||
@@ -247,31 +245,25 @@ define ____printzv_contents
|
||||
printf "const: %s", $zvalue->value.str->val
|
||||
end
|
||||
if $type == 12
|
||||
printf "CONSTANT_AST"
|
||||
printf "const_ast"
|
||||
end
|
||||
if $type == 13
|
||||
printf "_BOOL"
|
||||
printf "_IS_BOOL"
|
||||
end
|
||||
if $type == 14
|
||||
printf "CALLABLE"
|
||||
printf "IS_CALLABLE"
|
||||
end
|
||||
if $type == 15
|
||||
printf "indirect: "
|
||||
____printzv $zvalue->value.zv $arg1
|
||||
end
|
||||
if $type == 16
|
||||
printf "string_offset"
|
||||
end
|
||||
if $type == 17
|
||||
printf "pointer: %p", $zvalue->value.ptr
|
||||
end
|
||||
if $type == 18
|
||||
printf "ITERABLE"
|
||||
end
|
||||
if $type == 19
|
||||
printf "VOID"
|
||||
end
|
||||
if $type == 20
|
||||
printf "_ERROR"
|
||||
end
|
||||
if $type == 16 || $type > 20
|
||||
if $type > 17
|
||||
printf "unknown type %d", $type
|
||||
end
|
||||
printf "\n"
|
||||
@@ -291,28 +283,38 @@ define ____printzv
|
||||
end
|
||||
end
|
||||
|
||||
define print_global_vars
|
||||
____executor_globals
|
||||
set $symtable = ((HashTable *)&($eg_ptr->symbol_table))
|
||||
print_ht $symtable
|
||||
end
|
||||
define ____print_const_table
|
||||
set $ht = $arg0
|
||||
set $p = $ht->pListHead
|
||||
|
||||
document print_global_vars
|
||||
Prints the global variables
|
||||
while $p != 0
|
||||
set $const = (zend_constant *) $p->pData
|
||||
|
||||
set $i = $ind
|
||||
while $i > 0
|
||||
printf " "
|
||||
set $i = $i - 1
|
||||
end
|
||||
|
||||
if $p->nKeyLength > 0
|
||||
____print_str $p->arKey $p->nKeyLength
|
||||
printf " => "
|
||||
else
|
||||
printf "%d => ", $p->h
|
||||
end
|
||||
|
||||
____printzv_contents &$const->value 0
|
||||
set $p = $p->pListNext
|
||||
end
|
||||
end
|
||||
|
||||
define print_const_table
|
||||
set $ind = 1
|
||||
printf "[%p] {\n", $arg0
|
||||
____print_ht $arg0 4
|
||||
____print_const_table $arg0
|
||||
printf "}\n"
|
||||
end
|
||||
|
||||
document print_const_table
|
||||
Dumps elements of Constants HashTable
|
||||
Example: print_const_table executor_globals.zend_constants
|
||||
end
|
||||
|
||||
define ____print_ht
|
||||
set $ht = (HashTable*)$arg0
|
||||
set $n = $ind
|
||||
@@ -359,10 +361,6 @@ define ____print_ht
|
||||
set $func = (zend_function*)$p->val.value.ptr
|
||||
printf "\"%s\"\n", $func->common.function_name->val
|
||||
end
|
||||
if $arg1 == 4
|
||||
set $const = (zend_constant *)$p->val.value.ptr
|
||||
____printzv $const 1
|
||||
end
|
||||
end
|
||||
set $i = $i + 1
|
||||
end
|
||||
|
||||
@@ -274,7 +274,6 @@ sapi/fpm/fpm/php-cgi
|
||||
sapi/phpdbg/phpdbg_parser.c
|
||||
sapi/phpdbg/phpdbg_parser.h
|
||||
sapi/phpdbg/phpdbg
|
||||
sapi/phpdbg/phpdbg.1
|
||||
scripts/php-config
|
||||
scripts/phpize
|
||||
scripts/man1/*.1
|
||||
|
||||
+1
-3
@@ -1,6 +1,6 @@
|
||||
dist: trusty
|
||||
language: c
|
||||
sudo: required
|
||||
sudo: false
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
@@ -47,8 +47,6 @@ env:
|
||||
- ENABLE_MAINTAINER_ZTS=1 ENABLE_DEBUG=1
|
||||
|
||||
before_script:
|
||||
# Enable IPv6
|
||||
- sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
|
||||
# Compile PHP
|
||||
- ./travis/compile.sh
|
||||
# Setup Extensions
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: fpm
|
||||
PRIMARY MAINTAINER: Jakub Zelenka <bukka@php.net>
|
||||
PRIMARY MAINTAINER: Antony Dovgal <tony2001@php.net>, Jerome Loyet <fat@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.3.3
|
||||
|
||||
+1
-1
@@ -121,7 +121,7 @@ distclean: clean
|
||||
rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h main/internal_functions_cli.c main/internal_functions.c stamp-h buildmk.stamp Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak Zend/zend_config.h TSRM/tsrm_config.h
|
||||
rm -f php7.spec main/build-defs.h scripts/phpize
|
||||
rm -f ext/date/lib/timelib_config.h ext/mbstring/oniguruma/config.h ext/mbstring/libmbfl/config.h ext/oci8/oci8_dtrace_gen.h ext/oci8/oci8_dtrace_gen.h.bak
|
||||
rm -f scripts/man1/phpize.1 scripts/php-config scripts/man1/php-config.1 sapi/cli/php.1 sapi/cgi/php-cgi.1 sapi/phpdbg/phpdbg.1 ext/phar/phar.1 ext/phar/phar.phar.1
|
||||
rm -f scripts/man1/phpize.1 scripts/php-config scripts/man1/php-config.1 sapi/cli/php.1 sapi/cgi/php-cgi.1 ext/phar/phar.1 ext/phar/phar.phar.1
|
||||
rm -f sapi/fpm/php-fpm.conf sapi/fpm/init.d.php-fpm sapi/fpm/php-fpm.service sapi/fpm/php-fpm.8 sapi/fpm/status.html
|
||||
rm -f ext/iconv/php_have_bsd_iconv.h ext/iconv/php_have_glibc_iconv.h ext/iconv/php_have_ibm_iconv.h ext/iconv/php_have_iconv.h ext/iconv/php_have_libiconv.h ext/iconv/php_iconv_aliased_libiconv.h ext/iconv/php_iconv_supports_errno.h ext/iconv/php_php_iconv_h_path.h ext/iconv/php_php_iconv_impl.h
|
||||
rm -f ext/phar/phar.phar ext/phar/phar.php
|
||||
|
||||
@@ -1,284 +1,5 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
11 Oct 2018, PHP 7.1.23
|
||||
|
||||
- Core:
|
||||
. Fixed bug #76901 (method_exists on SPL iterator passthrough method corrupts
|
||||
memory). (Nikita)
|
||||
. Fixed bug #76846 (Segfault in shutdown function after memory limit error).
|
||||
(Nikita)
|
||||
|
||||
- CURL:
|
||||
. Fixed bug #76480 (Use curl_multi_wait() so that timeouts are respected).
|
||||
(Pierrick)
|
||||
|
||||
- iconv:
|
||||
. Fixed bug #66828 (iconv_mime_encode Q-encoding longer than it should be).
|
||||
(cmb)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #76832 (ZendOPcache.MemoryBase periodically deleted by the OS).
|
||||
(Anatol)
|
||||
|
||||
- POSIX:
|
||||
. Fixed bug #75696 (posix_getgrnam fails to print details of group). (cmb)
|
||||
|
||||
- Reflection:
|
||||
. Fixed bug #74454 (Wrong exception being thrown when using ReflectionMethod).
|
||||
(cmb)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #73457 (Wrong error message when fopen FTP wrapped fails to open
|
||||
data connection). (Ville Hukkamäki)
|
||||
. Fixed bug #74764 (Bindto IPv6 works with file_get_contents but fails with
|
||||
stream_socket_client). (Ville Hukkamäki)
|
||||
. Fixed bug #75533 (array_reduce is slow when $carry is large array).
|
||||
(Manabu Matsui)
|
||||
|
||||
- Zlib:
|
||||
. Fixed bug #75273 (php_zlib_inflate_filter() may not update bytes_consumed).
|
||||
(Martin Burke, cmb)
|
||||
|
||||
13 Sep 2018, PHP 7.1.22
|
||||
|
||||
- Core:
|
||||
. Fixed bug #76754 (parent private constant in extends class memory leak).
|
||||
(Laruence)
|
||||
. Fixed bug #72443 (Generate enabled extension). (petk)
|
||||
|
||||
- Bz2:
|
||||
. Fixed arginfo for bzcompress. (Tyson Andre)
|
||||
|
||||
- gettext:
|
||||
. Fixed bug #76517 (incorrect restoring of LDFLAGS). (sji)
|
||||
|
||||
- iconv:
|
||||
. Fixed bug #68180 (iconv_mime_decode can return extra characters in a
|
||||
header). (cmb)
|
||||
. Fixed bug #63839 (iconv_mime_decode_headers function is skipping headers).
|
||||
(cmb)
|
||||
. Fixed bug #60494 (iconv_mime_decode does ignore special characters). (cmb)
|
||||
. Fixed bug #55146 (iconv_mime_decode_headers() skips some headers). (cmb)
|
||||
|
||||
- intl:
|
||||
. Fixed bug #74484 (MessageFormatter::formatMessage memory corruption with
|
||||
11+ named placeholders). (Anatol)
|
||||
|
||||
- libxml:
|
||||
. Fixed bug #76777 ("public id" parameter of libxml_set_external_entity_loader
|
||||
callback undefined). (Ville Hukkamäki)
|
||||
|
||||
- mbstring:
|
||||
. Fixed bug #76704 (mb_detect_order return value varies based on argument
|
||||
type). (cmb)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #76747 (Opcache treats path containing "test.pharma.tld" as a phar
|
||||
file). (Laruence)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #76705 (unusable ssl => peer_fingerprint in
|
||||
stream_context_create()). (Jakub Zelenka)
|
||||
|
||||
- phpdbg:
|
||||
. Fixed bug #76595 (phpdbg man page contains outdated information).
|
||||
(Kevin Abel)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #68825 (Exception in DirectoryIterator::getLinkTarget()). (cmb)
|
||||
. Fixed bug #68175 (RegexIterator pregFlags are NULL instead of 0). (Tim
|
||||
Siebels)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #76778 (array_reduce leaks memory if callback throws exception).
|
||||
(cmb)
|
||||
|
||||
- zlib:
|
||||
. Fixed bug #65988 (Zlib version check fails when an include/zlib/ style dir
|
||||
is passed to the --with-zlib configure option). (Jay Bonci)
|
||||
. Fixed bug #76709 (Minimal required zlib library is 1.2.0.4). (petk)
|
||||
|
||||
16 Aug 2018, PHP 7.1.21
|
||||
|
||||
- Calendar:
|
||||
. Fixed bug #52974 (jewish.c: compile error under Windows with GBK charset).
|
||||
(cmb)
|
||||
|
||||
- Filter:
|
||||
. Fixed bug #76366 (References in sub-array for filtering breaks the filter).
|
||||
(ZiHang Gao)
|
||||
|
||||
- PDO_Firebird:
|
||||
. Fixed bug #76488 (Memory leak when fetching a BLOB field). (Simonov Denis)
|
||||
|
||||
- PDO_PgSQL:
|
||||
. Fixed bug #75402 (Possible Memory Leak using PDO::CURSOR_SCROLL option).
|
||||
(Anatol)
|
||||
|
||||
- SQLite3:
|
||||
. Fixed #76665 (SQLite3Stmt::bindValue() with SQLITE3_FLOAT doesn't juggle).
|
||||
(cmb)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #68553 (array_column: null values in $index_key become incrementing
|
||||
keys in result). (Laruence)
|
||||
. Fixed bug #73817 (Incorrect entries in get_html_translation_table). (cmb)
|
||||
. Fixed bug #76643 (Segmentation fault when using `output_add_rewrite_var`).
|
||||
(cmb)
|
||||
|
||||
- Zip:
|
||||
. Fixed bug #76524 (ZipArchive memory leak (OVERWRITE flag and empty archive)).
|
||||
(Timur Ibragimov)
|
||||
|
||||
07 Jul 2018, PHP 7.1.20
|
||||
|
||||
- Core:
|
||||
. Fixed bug #76534 (PHP hangs on 'illegal string offset on string references
|
||||
with an error handler). (Laruence)
|
||||
. Fixed bug #76502 (Chain of mixed exceptions and errors does not serialize
|
||||
properly). (Nikita)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #76462 (Undefined property: DateInterval::$f). (Anatol)
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #73342 (Vulnerability in php-fpm by changing stdin to
|
||||
non-blocking). (Nikita)
|
||||
|
||||
- GMP:
|
||||
. Fixed bug #74670 (Integer Underflow when unserializing GMP and possible
|
||||
other classes). (Nikita)
|
||||
|
||||
- intl:
|
||||
. Fixed bug #76556 (get_debug_info handler for BreakIterator shows wrong
|
||||
type). (cmb)
|
||||
|
||||
- mbstring:
|
||||
. Fixed bug #76532 (Integer overflow and excessive memory usage
|
||||
in mb_strimwidth). (MarcusSchwarz)
|
||||
|
||||
- PGSQL:
|
||||
. Fixed bug #76548 (pg_fetch_result did not fetch the next row). (Anatol)
|
||||
|
||||
- phpdbg:
|
||||
. Fix arginfo wrt. optional/required parameters. (cmb)
|
||||
|
||||
- Reflection:
|
||||
. Fixed bug #76536 (PHP crashes with core dump when throwing exception in
|
||||
error handler). (Laruence)
|
||||
. Fixed bug #75231 (ReflectionProperty#getValue() incorrectly works with
|
||||
inherited classes). (Nikita)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #76505 (array_merge_recursive() is duplicating sub-array keys).
|
||||
(Laruence)
|
||||
. Fixed bug #71848 (getimagesize with $imageinfo returns false). (cmb)
|
||||
|
||||
22 Jun 2018, PHP 7.1.19
|
||||
|
||||
- CLI Server:
|
||||
. Fixed bug #76333 (PHP built-in server does not find files if root path
|
||||
contains special characters). (Anatol)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #76296 (openssl_pkey_get_public does not respect open_basedir).
|
||||
(Erik Lax, Jakub Zelenka)
|
||||
. Fixed bug #76174 (openssl extension fails to build with LibreSSL 2.7).
|
||||
(Jakub Zelenka)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #76367 (NoRewindIterator segfault 11). (Laruence)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #76335 ("link(): Bad file descriptor" with non-ASCII path).
|
||||
(Anatol)
|
||||
. Fixed bug #76383 (array_map on $GLOBALS returns IS_INDIRECT). (Bob)
|
||||
|
||||
24 May 2018, PHP 7.1.18
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #76075 --with-fpm-acl wrongly tries to find libacl on FreeBSD.
|
||||
(mgorny)
|
||||
|
||||
- intl:
|
||||
. Fixed bug #74385 (Locale::parseLocale() broken with some arguments).
|
||||
(Anatol)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #76205 (PHP-FPM sporadic crash when running Infinitewp). (Dmitry)
|
||||
. Fixed bug #76275 (Assertion failure in file cache when unserializing empty
|
||||
try_catch_array). (Nikita)
|
||||
. Fixed bug #76281 (Opcache causes incorrect "undefined variable" errors).
|
||||
(Nikita)
|
||||
|
||||
- Reflection:
|
||||
. Fixed arginfo for array_replace(_recursive) and array_merge(_recursive).
|
||||
(carusogabriel)
|
||||
|
||||
|
||||
26 Apr 2018, PHP 7.1.17
|
||||
|
||||
- Date:
|
||||
. Fixed bug #76131 (mismatch arginfo for date_create). (carusogabriel)
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #68440 (ERROR: failed to reload: execvp() failed: Argument list
|
||||
too long). (Jacob Hipps)
|
||||
. Fixed incorrect write to getenv result in FPM reload. (Jakub Zelenka)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #52070 (imagedashedline() - dashed line sometimes is not visible).
|
||||
(cmb)
|
||||
|
||||
- intl:
|
||||
. Fixed bug #76153 (Intl compilation fails with icu4c 61.1). (Anatol)
|
||||
|
||||
- mbstring:
|
||||
. Fixed bug #75944 (Wrong cp1251 detection). (dmk001)
|
||||
. Fixed bug #76113 (mbstring does not build with Oniguruma 6.8.1).
|
||||
(chrullrich, cmb)
|
||||
|
||||
- phpdbg:
|
||||
. Fixed bug #76143 (Memory corruption: arbitrary NUL overwrite). (Laruence)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #76131 (mismatch arginfo for splarray constructor).
|
||||
(carusogabriel)
|
||||
|
||||
- standard:
|
||||
. Fixed bug #75996 (incorrect url in header for mt_rand). (tatarbj)
|
||||
|
||||
29 Mar 2018, PHP 7.1.16
|
||||
|
||||
- Core:
|
||||
. Fixed bug #76025 (Segfault while throwing exception in error_handler).
|
||||
(Dmitry, Laruence)
|
||||
. Fixed bug #76044 ('date: illegal option -- -' in ./configure on FreeBSD).
|
||||
(Anatol)
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #75605 (Dumpable FPM child processes allow bypassing opcache
|
||||
access controls). (Jakub Zelenka)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #73957 (signed integer conversion in imagescale()). (cmb)
|
||||
|
||||
- ODBC:
|
||||
. Fixed bug #76088 (ODBC functions are not available by default on Windows).
|
||||
(cmb)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #76074 (opcache corrupts variable in for-loop). (Bob)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #76085 (Segmentation fault in buildFromIterator when directory
|
||||
name contains a \n). (Laruence)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #74139 (mail.add_x_header default inconsistent with docs). (cmb)
|
||||
. Fixed bug #76068 (parse_ini_string fails to parse "[foo]\nbar=1|>baz" with
|
||||
segfault). (Anatol)
|
||||
|
||||
01 Mar 2018, PHP 7.1.15
|
||||
|
||||
- Apache2Handler:
|
||||
@@ -292,14 +13,11 @@ PHP NEWS
|
||||
. Fixed bug #68406 (calling var_dump on a DateTimeZone object modifies it).
|
||||
(jhdxr)
|
||||
|
||||
- FTP:
|
||||
. Fixed ftp_pasv arginfo. (carusogabriel)
|
||||
- PGSQL:
|
||||
. Fixed #75838 (Memory leak in pg_escape_bytea()). (ard_1 at mail dot ru)
|
||||
|
||||
-GD:
|
||||
. Fixed imagesetinterpolation arginfo. (Gabriel Caruso)
|
||||
|
||||
- iconv:
|
||||
. Fixed bug #75867 (Freeing uninitialized pointer). (Philip Prindeville)
|
||||
- ODBC:
|
||||
. Fixed bug #73725 (Unable to retrieve value of varchar(max) type). (Anatol)
|
||||
|
||||
- LDAP:
|
||||
. Fixed bug #49876 (Fix LDAP path lookup on 64-bit distros). (dzuelke)
|
||||
@@ -307,27 +25,6 @@ PHP NEWS
|
||||
- libxml2:
|
||||
. Fixed bug #75871 (use pkg-config where available). (pmmaga)
|
||||
|
||||
- mysqlnd
|
||||
. Fixed negotiation of MySQL authenticaton plugin. (Johannes)
|
||||
. Fixed a memleak with SSL connections. (Johannes)
|
||||
|
||||
- ODBC:
|
||||
. Fixed bug #73725 (Unable to retrieve value of varchar(max) type). (Anatol)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #75969 (Assertion failure in live range DCE due to block pass
|
||||
misoptimization). (Nikita)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed openssl_* arginfos. (carusogabriel)
|
||||
|
||||
- PCNTL:
|
||||
. Fixed bug #75873 (pcntl_wexitstatus returns incorrect on Big_Endian platform
|
||||
(s390x)). (Sam Ding)
|
||||
|
||||
- PGSQL:
|
||||
. Fixed #75838 (Memory leak in pg_escape_bytea()). (ard_1 at mail dot ru)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #65414 (deal with leading slash when adding files correctly).
|
||||
(bishopb)
|
||||
@@ -336,10 +33,8 @@ PHP NEWS
|
||||
. Fixed bug #74519 (strange behavior of AppendIterator). (jhdxr)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #75961 (Strange references behavior). (Laruence)
|
||||
. Fixed bug #75916 (DNS_CAA record results contain garbage). (Mike,
|
||||
Philip Sharp)
|
||||
. Fixed some arginfos. (carusogabriel)
|
||||
. Fixed bug #75981 (stack-buffer-overflow while parsing HTTP response). (Stas)
|
||||
|
||||
01 Feb 2018, PHP 7.1.14
|
||||
@@ -361,9 +56,6 @@ PHP NEWS
|
||||
- IMAP:
|
||||
. Fixed bug #75774 (imap_append HeapCorruction). (Anatol)
|
||||
|
||||
- Mbstring:
|
||||
. Fixed bug #62545 (wrong unicode mapping in some charsets). (cmb)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug #75720 (File cache not populated after SHM runs full). (Dmitry)
|
||||
. Fixed bug #75579 (Interned strings buffer overflow may cause crash).
|
||||
|
||||
+3
-3
@@ -70,7 +70,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
#endif
|
||||
|
||||
#ifndef zend_isnan
|
||||
#if HAVE_DECL_ISNAN && (!defined(__cplusplus) || __cplusplus < 201103L)
|
||||
#if HAVE_DECL_ISNAN
|
||||
#define zend_isnan(a) isnan(a)
|
||||
#elif defined(HAVE_FPCLASS)
|
||||
#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
|
||||
@@ -79,7 +79,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAVE_DECL_ISINF && (!defined(__cplusplus) || __cplusplus < 201103L)
|
||||
#if HAVE_DECL_ISINF
|
||||
#define zend_isinf(a) isinf(a)
|
||||
#elif defined(INFINITY)
|
||||
/* Might not work, but is required by ISO C99 */
|
||||
@@ -90,7 +90,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
#define zend_isinf(a) 0
|
||||
#endif
|
||||
|
||||
#if HAVE_DECL_ISFINITE && (!defined(__cplusplus) || __cplusplus < 201103L)
|
||||
#if HAVE_DECL_ISFINITE
|
||||
#define zend_finite(a) isfinite(a)
|
||||
#elif defined(HAVE_FINITE)
|
||||
#define zend_finite(a) finite(a)
|
||||
|
||||
@@ -20,7 +20,7 @@ assert(0 && ($a = function () {
|
||||
yield from $x;
|
||||
}));
|
||||
|
||||
assert(0 && ($a = function &(array &$a, ?X $b = null) use ($c,&$d) : ?X {
|
||||
assert(0 && ($a = function &(array &$a, X $b = null) use ($c,&$d) : X {
|
||||
abstract class A extends B implements C, D {
|
||||
const X = 12;
|
||||
const Y = self::X, Z = "aaa";
|
||||
@@ -161,7 +161,7 @@ Warning: assert(): assert(0 && ($a = function () {
|
||||
yield from $x;
|
||||
})) failed in %sexpect_015.php on line %d
|
||||
|
||||
Warning: assert(): assert(0 && ($a = function &(array &$a, ?X $b = null) use($c, &$d): ?X {
|
||||
Warning: assert(): assert(0 && ($a = function &(array &$a, X $b = null) use($c, &$d): X {
|
||||
abstract class A extends B implements C, D {
|
||||
const X = 12;
|
||||
const Y = self::X, Z = 'aaa';
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
--TEST--
|
||||
Bug #76025 (Segfault while throwing exception in error_handler)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function handleError($errno, $errstr, $errfile, $errline) {
|
||||
$exception = new exception("blah");
|
||||
throw $exception;
|
||||
}
|
||||
set_error_handler('handleError', E_ALL);
|
||||
$c = $b[$a];
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught Exception: blah in %sbug76025.php:%d
|
||||
Stack trace:
|
||||
#0 %sbug76025.php(%d): handleError(8, 'Undefined varia...', '%s', %d, Array)
|
||||
#1 {main}
|
||||
thrown in %sbug76025.php on line %d
|
||||
@@ -1,13 +0,0 @@
|
||||
--TEST--
|
||||
Bug #76383: array_map on $GLOBALS returns IS_INDIRECT
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$a = 1;
|
||||
array_map(function($x) use (&$lastval) { $lastval = $x; }, $GLOBALS);
|
||||
var_dump(gettype($lastval), $lastval); // will contain $a
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
string(7) "integer"
|
||||
int(1)
|
||||
@@ -1,36 +0,0 @@
|
||||
--TEST--
|
||||
Bug #76502: Chain of mixed exceptions and errors does not serialize properly
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$examples = [
|
||||
"Exception(Exception())" => new Exception("outer", 0, new Exception("inner")),
|
||||
"Error(Error())" => new Error("outer", 0, new Error("inner")),
|
||||
"Error(Exception())" => new Error("outer", 0, new Exception("inner")),
|
||||
"Exception(Error())" => new Exception("outer", 0, new Error("inner"))
|
||||
];
|
||||
|
||||
foreach ($examples as $name => $example) {
|
||||
$processed = unserialize(serialize($example));
|
||||
$processedPrev = $processed->getPrevious();
|
||||
echo "---- $name ----\n";
|
||||
echo "before: ", get_class($example), ".previous == ",
|
||||
get_class($example->getPrevious()), "\n";
|
||||
echo "after : ", get_class($processed), ".previous == ",
|
||||
$processedPrev ? get_class($processedPrev) : "null", "\n";
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
---- Exception(Exception()) ----
|
||||
before: Exception.previous == Exception
|
||||
after : Exception.previous == Exception
|
||||
---- Error(Error()) ----
|
||||
before: Error.previous == Error
|
||||
after : Error.previous == Error
|
||||
---- Error(Exception()) ----
|
||||
before: Error.previous == Exception
|
||||
after : Error.previous == Exception
|
||||
---- Exception(Error()) ----
|
||||
before: Exception.previous == Error
|
||||
after : Exception.previous == Error
|
||||
@@ -1,17 +0,0 @@
|
||||
--TEST--
|
||||
Bug #76534 (PHP hangs on 'illegal string offset on string references with an error handler)
|
||||
--FILE--
|
||||
<?php
|
||||
set_error_handler(function ($severity, $message, $file, $line) {
|
||||
throw new \Exception($message);
|
||||
});
|
||||
|
||||
$x = "foo";
|
||||
$y = &$x["bar"];
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught Exception: Illegal string offset 'bar' in %sbug76534.php:%d
|
||||
Stack trace:
|
||||
#0 %sbug76534.php(%d): {closure}(2, 'Illegal string ...', '%s', %d, Array)
|
||||
#1 {main}
|
||||
thrown in %sbug76534.php on line %d
|
||||
@@ -1,18 +0,0 @@
|
||||
--TEST--
|
||||
Bug #76754 (parent private constant in extends class memory leak)
|
||||
--INI--
|
||||
opcache.enable=0
|
||||
opcache.enable_cli=0
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class FOO
|
||||
{
|
||||
private const FOO = 'BAR';
|
||||
}
|
||||
|
||||
class BAR extends FOO { }
|
||||
?>
|
||||
okey
|
||||
--EXPECT--
|
||||
okey
|
||||
@@ -1,26 +0,0 @@
|
||||
--TEST--
|
||||
Bug #76846: Segfault in shutdown function after memory limit error
|
||||
--INI--
|
||||
memory_limit=33M
|
||||
--SKIPIF--
|
||||
<?php
|
||||
$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
|
||||
if ($zend_mm_enabled === "0") {
|
||||
die("skip Zend MM disabled");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
register_shutdown_function(function() {
|
||||
new stdClass;
|
||||
});
|
||||
|
||||
$ary = [];
|
||||
while (true) {
|
||||
$ary[] = new stdClass;
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Allowed memory size of %d bytes exhausted%s(tried to allocate %d bytes) in %s on line %d%A
|
||||
@@ -1,18 +0,0 @@
|
||||
--TEST--
|
||||
Bug #76901: method_exists on SPL iterator passthrough method corrupts memory
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$it = new ArrayIterator([1, 2, 3]);
|
||||
$it = new IteratorIterator($it);
|
||||
foreach ($it as $v) {
|
||||
if (method_exists($it, 'offsetGet')) {
|
||||
var_dump($it->offsetGet(0));
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
int(1)
|
||||
int(1)
|
||||
int(1)
|
||||
@@ -2810,7 +2810,6 @@ ZEND_API int zend_disable_class(char *class_name, size_t class_name_length) /* {
|
||||
key = zend_string_alloc(class_name_length, 0);
|
||||
zend_str_tolower_copy(ZSTR_VAL(key), class_name, class_name_length);
|
||||
disabled_class = zend_hash_find_ptr(CG(class_table), key);
|
||||
zend_string_release(key);
|
||||
if (!disabled_class) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
+1
-8
@@ -195,14 +195,7 @@ ZEND_API void * __zend_realloc(void *p, size_t len) ZEND_ATTRIBUTE_ALLOC_SIZE(2)
|
||||
#define pemalloc(size, persistent) ((persistent)?__zend_malloc(size):emalloc(size))
|
||||
#define safe_pemalloc(nmemb, size, offset, persistent) ((persistent)?_safe_malloc(nmemb, size, offset):safe_emalloc(nmemb, size, offset))
|
||||
#define pefree(ptr, persistent) ((persistent)?free(ptr):efree(ptr))
|
||||
#define pefree_size(ptr, size, persistent) do { \
|
||||
if (persistent) { \
|
||||
free(ptr); \
|
||||
} else { \
|
||||
efree_size(ptr, size);\
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define pefree_size(ptr, size, persistent) ((persistent)?free(ptr):efree_size(ptr, size))
|
||||
#define pecalloc(nmemb, size, persistent) ((persistent)?__zend_calloc((nmemb), (size)):ecalloc((nmemb), (size)))
|
||||
#define perealloc(ptr, size, persistent) ((persistent)?__zend_realloc((ptr), (size)):erealloc((ptr), (size)))
|
||||
#define perealloc2(ptr, size, copy_size, persistent) ((persistent)?__zend_realloc((ptr), (size)):erealloc2((ptr), (size), (copy_size)))
|
||||
|
||||
@@ -1080,9 +1080,6 @@ tail_call:
|
||||
zend_ast_export_ex(str, decl->child[1], 0, indent);
|
||||
if (decl->child[3]) {
|
||||
smart_str_appends(str, ": ");
|
||||
if (decl->child[3]->attr & ZEND_TYPE_NULLABLE) {
|
||||
smart_str_appendc(str, '?');
|
||||
}
|
||||
zend_ast_export_ns_name(str, decl->child[3], 0, indent);
|
||||
}
|
||||
if (decl->child[2]) {
|
||||
@@ -1617,9 +1614,6 @@ simple_list:
|
||||
break;
|
||||
case ZEND_AST_PARAM:
|
||||
if (ast->child[0]) {
|
||||
if (ast->child[0]->attr & ZEND_TYPE_NULLABLE) {
|
||||
smart_str_appendc(str, '?');
|
||||
}
|
||||
zend_ast_export_ns_name(str, ast->child[0], 0, indent);
|
||||
smart_str_appendc(str, ' ');
|
||||
}
|
||||
|
||||
@@ -1400,10 +1400,13 @@ ZEND_FUNCTION(method_exists)
|
||||
if (zend_hash_exists(&ce->function_table, lcname)) {
|
||||
zend_string_release(lcname);
|
||||
RETURN_TRUE;
|
||||
} else if (Z_TYPE_P(klass) == IS_OBJECT && Z_OBJ_HT_P(klass)->get_method != NULL) {
|
||||
zend_object *obj = Z_OBJ_P(klass);
|
||||
zend_function *func = Z_OBJ_HT_P(klass)->get_method(&obj, method_name, NULL);
|
||||
if (func != NULL) {
|
||||
} else {
|
||||
union _zend_function *func = NULL;
|
||||
|
||||
if (Z_TYPE_P(klass) == IS_OBJECT
|
||||
&& Z_OBJ_HT_P(klass)->get_method != NULL
|
||||
&& (func = Z_OBJ_HT_P(klass)->get_method(&Z_OBJ_P(klass), method_name, NULL)) != NULL
|
||||
) {
|
||||
if (func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) {
|
||||
/* Returns true to the fake Closure's __invoke */
|
||||
RETVAL_BOOL(func->common.scope == zend_ce_closure
|
||||
|
||||
@@ -323,7 +323,7 @@ ZEND_METHOD(exception, __wakeup)
|
||||
CHECK_EXC_TYPE(ZEND_STR_TRACE, IS_ARRAY);
|
||||
pvalue = zend_read_property(i_get_exception_base(object), object, "previous", sizeof("previous")-1, 1, &value);
|
||||
if (pvalue && Z_TYPE_P(pvalue) != IS_NULL && (Z_TYPE_P(pvalue) != IS_OBJECT ||
|
||||
!instanceof_function(Z_OBJCE_P(pvalue), zend_ce_throwable) ||
|
||||
!instanceof_function(Z_OBJCE_P(pvalue), i_get_exception_base(object)) ||
|
||||
pvalue == object)) {
|
||||
zend_unset_property(i_get_exception_base(object), object, "previous", sizeof("previous")-1);
|
||||
}
|
||||
|
||||
+7
-13
@@ -213,10 +213,9 @@ static zend_always_inline zval *_get_zval_ptr_var_deref(uint32_t var, const zend
|
||||
|
||||
static zend_never_inline ZEND_COLD void zval_undefined_cv(uint32_t var, const zend_execute_data *execute_data)
|
||||
{
|
||||
if (EXPECTED(EG(exception) == NULL)) {
|
||||
zend_string *cv = CV_DEF_OF(EX_VAR_TO_NUM(var));
|
||||
zend_error(E_NOTICE, "Undefined variable: %s", ZSTR_VAL(cv));
|
||||
}
|
||||
zend_string *cv = CV_DEF_OF(EX_VAR_TO_NUM(var));
|
||||
|
||||
zend_error(E_NOTICE, "Undefined variable: %s", ZSTR_VAL(cv));
|
||||
}
|
||||
|
||||
static zend_never_inline zval *_get_zval_cv_lookup(zval *ptr, uint32_t var, int type, const zend_execute_data *execute_data)
|
||||
@@ -1042,12 +1041,9 @@ static int zend_verify_internal_return_type(zend_function *zf, zval *ret)
|
||||
zend_internal_arg_info *ret_info = zf->internal_function.arg_info - 1;
|
||||
zend_class_entry *ce = NULL;
|
||||
|
||||
if (ret_info->type_hint == IS_VOID) {
|
||||
if (UNEXPECTED(Z_TYPE_P(ret) != IS_NULL)) {
|
||||
zend_verify_void_return_error(zf, zend_zval_type_name(ret), "");
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
if (UNEXPECTED(ret_info->type_hint == IS_VOID && Z_TYPE_P(ret) != IS_NULL)) {
|
||||
zend_verify_void_return_error(zf, zend_zval_type_name(ret), "");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (UNEXPECTED(!zend_check_internal_type(zf, ret_info, ret, &ce, 1))) {
|
||||
@@ -1703,9 +1699,7 @@ fetch_from_array:
|
||||
zend_throw_error(NULL, "[] operator not supported for strings");
|
||||
} else {
|
||||
zend_check_string_offset(dim, type);
|
||||
if (EXPECTED(EG(exception) == NULL)) {
|
||||
zend_wrong_string_offset();
|
||||
}
|
||||
zend_wrong_string_offset();
|
||||
}
|
||||
ZVAL_ERROR(result);
|
||||
} else if (EXPECTED(Z_TYPE_P(container) == IS_OBJECT)) {
|
||||
|
||||
+1
-1
@@ -1765,7 +1765,7 @@ ZEND_API HashTable* ZEND_FASTCALL zend_array_dup(HashTable *source)
|
||||
GC_TYPE_INFO(target) = IS_ARRAY;
|
||||
|
||||
target->nTableSize = source->nTableSize;
|
||||
target->pDestructor = ZVAL_PTR_DTOR;
|
||||
target->pDestructor = source->pDestructor;
|
||||
|
||||
if (source->nNumUsed == 0) {
|
||||
target->u.flags = (source->u.flags & ~(HASH_FLAG_INITIALIZED|HASH_FLAG_PACKED|HASH_FLAG_PERSISTENT|ZEND_HASH_APPLY_COUNT_MASK)) | HASH_FLAG_APPLY_PROTECTION | HASH_FLAG_STATIC_KEYS;
|
||||
|
||||
@@ -1225,14 +1225,9 @@ static void zend_add_trait_method(zend_class_entry *ce, const char *name, zend_s
|
||||
}
|
||||
|
||||
function_add_ref(fn);
|
||||
if (UNEXPECTED(fn->type == ZEND_INTERNAL_FUNCTION)) {
|
||||
new_fn = zend_arena_alloc(&CG(arena), sizeof(zend_internal_function));
|
||||
memcpy(new_fn, fn, sizeof(zend_internal_function));
|
||||
new_fn->common.fn_flags |= ZEND_ACC_ARENA_ALLOCATED;
|
||||
} else {
|
||||
new_fn = zend_arena_alloc(&CG(arena), sizeof(zend_op_array));
|
||||
memcpy(new_fn, fn, sizeof(zend_op_array));
|
||||
}
|
||||
new_fn = zend_arena_alloc(&CG(arena), sizeof(zend_op_array));
|
||||
memcpy(new_fn, fn, sizeof(zend_op_array));
|
||||
new_fn->common.fn_flags |= ZEND_ACC_ARENA_ALLOCATED;
|
||||
fn = zend_hash_update_ptr(&ce->function_table, key, new_fn);
|
||||
zend_add_magic_methods(ce, key, fn);
|
||||
}
|
||||
|
||||
+4
-12
@@ -57,19 +57,11 @@ static void zend_ini_do_op(char type, zval *result, zval *op1, zval *op2)
|
||||
int str_len;
|
||||
char str_result[MAX_LENGTH_OF_LONG+1];
|
||||
|
||||
if (IS_LONG == Z_TYPE_P(op1)) {
|
||||
i_op1 = Z_LVAL_P(op1);
|
||||
} else {
|
||||
i_op1 = atoi(Z_STRVAL_P(op1));
|
||||
zend_string_free(Z_STR_P(op1));
|
||||
}
|
||||
i_op1 = atoi(Z_STRVAL_P(op1));
|
||||
zend_string_free(Z_STR_P(op1));
|
||||
if (op2) {
|
||||
if (IS_LONG == Z_TYPE_P(op2)) {
|
||||
i_op2 = Z_LVAL_P(op2);
|
||||
} else {
|
||||
i_op2 = atoi(Z_STRVAL_P(op2));
|
||||
zend_string_free(Z_STR_P(op2));
|
||||
}
|
||||
i_op2 = atoi(Z_STRVAL_P(op2));
|
||||
zend_string_free(Z_STR_P(op2));
|
||||
} else {
|
||||
i_op2 = 0;
|
||||
}
|
||||
|
||||
@@ -116,10 +116,8 @@ ZEND_API void zend_objects_store_put(zend_object *object)
|
||||
EG(objects_store).free_list_head = GET_OBJ_BUCKET_NUMBER(EG(objects_store).object_buckets[handle]);
|
||||
} else {
|
||||
if (EG(objects_store).top == EG(objects_store).size) {
|
||||
uint32_t new_size = 2 * EG(objects_store).size;
|
||||
EG(objects_store).object_buckets = (zend_object **) erealloc(EG(objects_store).object_buckets, new_size * sizeof(zend_object*));
|
||||
/* Assign size after realloc, in case it fails */
|
||||
EG(objects_store).size = new_size;
|
||||
EG(objects_store).size <<= 1;
|
||||
EG(objects_store).object_buckets = (zend_object **) erealloc(EG(objects_store).object_buckets, EG(objects_store).size * sizeof(zend_object*));
|
||||
}
|
||||
handle = EG(objects_store).top++;
|
||||
}
|
||||
|
||||
+1
-1
@@ -296,8 +296,8 @@ ZEND_API void destroy_zend_class(zval *zv)
|
||||
}
|
||||
}
|
||||
} ZEND_HASH_FOREACH_END();
|
||||
zend_hash_destroy(&ce->constants_table);
|
||||
}
|
||||
zend_hash_destroy(&ce->constants_table);
|
||||
if (ce->num_interfaces > 0 && ce->interfaces) {
|
||||
efree(ce->interfaces);
|
||||
}
|
||||
|
||||
@@ -3101,7 +3101,7 @@ ZEND_API zend_long ZEND_FASTCALL zend_dval_to_lval_slow(double d)
|
||||
if (dmod < 0) {
|
||||
/* we're going to make this number positive; call ceil()
|
||||
* to simulate rounding towards 0 of the negative number */
|
||||
dmod = ceil(dmod) + two_pow_32;
|
||||
dmod = ceil(dmod);// + two_pow_32;
|
||||
}
|
||||
return (zend_long)(zend_ulong)dmod;
|
||||
}
|
||||
|
||||
+1
-3
@@ -891,9 +891,7 @@ ZEND_VM_C_LABEL(assign_dim_op_convert_to_array):
|
||||
zend_throw_error(NULL, "[] operator not supported for strings");
|
||||
} else {
|
||||
zend_check_string_offset(dim, BP_VAR_RW);
|
||||
if (EXPECTED(EG(exception) == NULL)) {
|
||||
zend_wrong_string_offset();
|
||||
}
|
||||
zend_wrong_string_offset();
|
||||
}
|
||||
} else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
|
||||
ZEND_VM_C_GOTO(assign_dim_op_convert_to_array);
|
||||
|
||||
+8
-24
@@ -17596,9 +17596,7 @@ assign_dim_op_convert_to_array:
|
||||
zend_throw_error(NULL, "[] operator not supported for strings");
|
||||
} else {
|
||||
zend_check_string_offset(dim, BP_VAR_RW);
|
||||
if (EXPECTED(EG(exception) == NULL)) {
|
||||
zend_wrong_string_offset();
|
||||
}
|
||||
zend_wrong_string_offset();
|
||||
}
|
||||
} else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
|
||||
goto assign_dim_op_convert_to_array;
|
||||
@@ -21016,9 +21014,7 @@ assign_dim_op_convert_to_array:
|
||||
zend_throw_error(NULL, "[] operator not supported for strings");
|
||||
} else {
|
||||
zend_check_string_offset(dim, BP_VAR_RW);
|
||||
if (EXPECTED(EG(exception) == NULL)) {
|
||||
zend_wrong_string_offset();
|
||||
}
|
||||
zend_wrong_string_offset();
|
||||
}
|
||||
} else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
|
||||
goto assign_dim_op_convert_to_array;
|
||||
@@ -22389,9 +22385,7 @@ assign_dim_op_convert_to_array:
|
||||
zend_throw_error(NULL, "[] operator not supported for strings");
|
||||
} else {
|
||||
zend_check_string_offset(dim, BP_VAR_RW);
|
||||
if (EXPECTED(EG(exception) == NULL)) {
|
||||
zend_wrong_string_offset();
|
||||
}
|
||||
zend_wrong_string_offset();
|
||||
}
|
||||
} else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
|
||||
goto assign_dim_op_convert_to_array;
|
||||
@@ -25336,9 +25330,7 @@ assign_dim_op_convert_to_array:
|
||||
zend_throw_error(NULL, "[] operator not supported for strings");
|
||||
} else {
|
||||
zend_check_string_offset(dim, BP_VAR_RW);
|
||||
if (EXPECTED(EG(exception) == NULL)) {
|
||||
zend_wrong_string_offset();
|
||||
}
|
||||
zend_wrong_string_offset();
|
||||
}
|
||||
} else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
|
||||
goto assign_dim_op_convert_to_array;
|
||||
@@ -37063,9 +37055,7 @@ assign_dim_op_convert_to_array:
|
||||
zend_throw_error(NULL, "[] operator not supported for strings");
|
||||
} else {
|
||||
zend_check_string_offset(dim, BP_VAR_RW);
|
||||
if (EXPECTED(EG(exception) == NULL)) {
|
||||
zend_wrong_string_offset();
|
||||
}
|
||||
zend_wrong_string_offset();
|
||||
}
|
||||
} else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
|
||||
goto assign_dim_op_convert_to_array;
|
||||
@@ -41675,9 +41665,7 @@ assign_dim_op_convert_to_array:
|
||||
zend_throw_error(NULL, "[] operator not supported for strings");
|
||||
} else {
|
||||
zend_check_string_offset(dim, BP_VAR_RW);
|
||||
if (EXPECTED(EG(exception) == NULL)) {
|
||||
zend_wrong_string_offset();
|
||||
}
|
||||
zend_wrong_string_offset();
|
||||
}
|
||||
} else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
|
||||
goto assign_dim_op_convert_to_array;
|
||||
@@ -44161,9 +44149,7 @@ assign_dim_op_convert_to_array:
|
||||
zend_throw_error(NULL, "[] operator not supported for strings");
|
||||
} else {
|
||||
zend_check_string_offset(dim, BP_VAR_RW);
|
||||
if (EXPECTED(EG(exception) == NULL)) {
|
||||
zend_wrong_string_offset();
|
||||
}
|
||||
zend_wrong_string_offset();
|
||||
}
|
||||
} else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
|
||||
goto assign_dim_op_convert_to_array;
|
||||
@@ -48234,9 +48220,7 @@ assign_dim_op_convert_to_array:
|
||||
zend_throw_error(NULL, "[] operator not supported for strings");
|
||||
} else {
|
||||
zend_check_string_offset(dim, BP_VAR_RW);
|
||||
if (EXPECTED(EG(exception) == NULL)) {
|
||||
zend_wrong_string_offset();
|
||||
}
|
||||
zend_wrong_string_offset();
|
||||
}
|
||||
} else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
|
||||
goto assign_dim_op_convert_to_array;
|
||||
|
||||
@@ -2248,9 +2248,6 @@ AC_DEFUN([PHP_SETUP_ICU],[
|
||||
ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio`
|
||||
PHP_EVAL_INCLINE($ICU_INCS)
|
||||
PHP_EVAL_LIBLINE($ICU_LIBS, $1)
|
||||
|
||||
ICU_CXXFLAGS=`$ICU_CONFIG --cxxflags`
|
||||
ICU_CXXFLAGS="$ICU_CXXFLAGS -DU_USING_ICU_NAMESPACE=1"
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
+5
-8
@@ -75,7 +75,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
#endif
|
||||
|
||||
#ifndef zend_isnan
|
||||
#if HAVE_DECL_ISNAN && (!defined(__cplusplus) || __cplusplus < 201103L)
|
||||
#if HAVE_DECL_ISNAN
|
||||
#define zend_isnan(a) isnan(a)
|
||||
#elif defined(HAVE_FPCLASS)
|
||||
#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
|
||||
@@ -84,7 +84,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAVE_DECL_ISINF && (!defined(__cplusplus) || __cplusplus < 201103L)
|
||||
#if HAVE_DECL_ISINF
|
||||
#define zend_isinf(a) isinf(a)
|
||||
#elif defined(INFINITY)
|
||||
/* Might not work, but is required by ISO C99 */
|
||||
@@ -95,7 +95,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
#define zend_isinf(a) 0
|
||||
#endif
|
||||
|
||||
#if HAVE_DECL_ISFINITE && (!defined(__cplusplus) || __cplusplus < 201103L)
|
||||
#if HAVE_DECL_ISFINITE
|
||||
#define zend_finite(a) isfinite(a)
|
||||
#elif defined(HAVE_FINITE)
|
||||
#define zend_finite(a) finite(a)
|
||||
@@ -119,7 +119,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
|
||||
PHP_MAJOR_VERSION=7
|
||||
PHP_MINOR_VERSION=1
|
||||
PHP_RELEASE_VERSION=23
|
||||
PHP_RELEASE_VERSION=15
|
||||
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`
|
||||
@@ -1286,10 +1286,7 @@ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
|
||||
EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $PHP_LDFLAGS"
|
||||
|
||||
# SOURCE_DATE_EPOCH for reproducible builds https://reproducible-builds.org/specs/source-date-epoch/
|
||||
PHP_BUILD_DATE=`date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d 2>/dev/null`
|
||||
if test $? -ne 0 ; then
|
||||
PHP_BUILD_DATE=`date -u +%Y-%m-%d`
|
||||
fi
|
||||
PHP_BUILD_DATE=`date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d`
|
||||
AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date])
|
||||
|
||||
case $host_alias in
|
||||
|
||||
@@ -6,11 +6,6 @@ if(!extension_loaded("bcmath")) print "skip";
|
||||
if (substr(PHP_OS, 0, 3) != 'WIN') {
|
||||
die('skip valid only for windows');
|
||||
}
|
||||
$cur = PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD;
|
||||
$req = "10.0.17134";
|
||||
if (version_compare($cur, $req) >= 0) {
|
||||
echo "skip Only for Windows systems < $req";
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
@@ -19,4 +14,5 @@ var_dump(bcpowmod(1, 1.2, 1, 1));
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(1) "1"
|
||||
%Astring(3) "0.0"%A
|
||||
string(3) "0.0"
|
||||
bc math warning: non-zero scale in exponent
|
||||
@@ -4,11 +4,7 @@ Bug 72093: bcpowmod accepts negative scale and corrupts _one_ definition
|
||||
<?php
|
||||
if(!extension_loaded("bcmath")) print "skip";
|
||||
if (substr(PHP_OS, 0, 3) == 'WIN') {
|
||||
$cur = PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD;
|
||||
$req = "10.0.17134";
|
||||
if (version_compare($cur, $req) < 0) {
|
||||
echo "skip Compatible on Windows systems >= $req";
|
||||
}
|
||||
die('skip Not valid for windows');
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -6,11 +6,6 @@ if (!extension_loaded('bcmath')) die('skip bcmath extension is not available');
|
||||
if (substr(PHP_OS, 0, 3) != 'WIN') {
|
||||
die('skip valid only for windows');
|
||||
}
|
||||
$cur = PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD;
|
||||
$req = "10.0.17134";
|
||||
if (version_compare($cur, $req) >= 0) {
|
||||
echo "skip Only for Windows systems < $req";
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
@@ -18,7 +13,9 @@ var_dump(bcpowmod('4.1', '4', '3', 3));
|
||||
var_dump(bcpowmod('4', '4', '3.1', 3));
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
%Astring(5) "1.000"
|
||||
%Astring(5) "1.000"
|
||||
===DONE===%A
|
||||
--EXPECT--
|
||||
string(5) "1.000"
|
||||
string(5) "1.000"
|
||||
===DONE===
|
||||
bc math warning: non-zero scale in base
|
||||
bc math warning: non-zero scale in modulus
|
||||
@@ -4,11 +4,7 @@ Bug #75178 (bcpowmod() misbehaves for non-integer base or modulus)
|
||||
<?php
|
||||
if (!extension_loaded('bcmath')) die('skip bcmath extension is not available');
|
||||
if (substr(PHP_OS, 0, 3) == 'WIN') {
|
||||
$cur = PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD;
|
||||
$req = "10.0.17134";
|
||||
if (version_compare($cur, $req) < 0) {
|
||||
echo "skip Compatible on Windows systems >= $req";
|
||||
}
|
||||
die('skip Not valid for windows');
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_bzerror, 0)
|
||||
ZEND_ARG_INFO(0, bz)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_bzcompress, 0, 0, 1)
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_bzcompress, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, source)
|
||||
ZEND_ARG_INFO(0, blocksize)
|
||||
ZEND_ARG_INFO(0, workfactor)
|
||||
|
||||
+25
-25
@@ -340,38 +340,38 @@ char *JewishMonthName[14] =
|
||||
char *JewishMonthHebNameLeap[14] =
|
||||
{
|
||||
"",
|
||||
"\xFA\xF9\xF8\xE9",
|
||||
"\xE7\xF9\xE5\xEF",
|
||||
"\xEB\xF1\xEC\xE5",
|
||||
"\xE8\xE1\xFA",
|
||||
"\xF9\xE1\xE8",
|
||||
"\xE0\xE3\xF8 \xE0'",
|
||||
"\xE0\xE3\xF8 \xE1'",
|
||||
"\xF0\xE9\xF1\xEF",
|
||||
"\xE0\xE9\xE9\xF8",
|
||||
"\xF1\xE9\xe5\xEF",
|
||||
"\xFA\xEE\xE5\xE6",
|
||||
"\xE0\xE1",
|
||||
"\xE0\xEC\xE5\xEC"
|
||||
"תשרי",
|
||||
"חשון",
|
||||
"כסלו",
|
||||
"טבת",
|
||||
"שבט",
|
||||
"אדר א'",
|
||||
"אדר ב'",
|
||||
"ניסן",
|
||||
"אייר",
|
||||
"סיון",
|
||||
"תמוז",
|
||||
"אב",
|
||||
"אלול"
|
||||
};
|
||||
|
||||
/* names for regular year */
|
||||
char *JewishMonthHebName[14] =
|
||||
{
|
||||
"",
|
||||
"\xFA\xF9\xF8\xE9",
|
||||
"\xE7\xF9\xE5\xEF",
|
||||
"\xEB\xF1\xEC\xE5",
|
||||
"\xE8\xE1\xFA",
|
||||
"\xF9\xE1\xE8",
|
||||
"תשרי",
|
||||
"חשון",
|
||||
"כסלו",
|
||||
"טבת",
|
||||
"שבט",
|
||||
"",
|
||||
"\xE0\xE3\xF8",
|
||||
"\xF0\xE9\xF1\xEF",
|
||||
"\xE0\xE9\xE9\xF8",
|
||||
"\xF1\xE9\xE5\xEF",
|
||||
"\xFA\xEE\xE5\xE6",
|
||||
"\xE0\xE1",
|
||||
"\xE0\xEC\xE5\xEC"
|
||||
"אדר",
|
||||
"ניסן",
|
||||
"אייר",
|
||||
"סיון",
|
||||
"תמוז",
|
||||
"אב",
|
||||
"אלול"
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
--TEST--
|
||||
Test all hebrew month names
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('calendar')) die('skip calendar extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
for ($year = 5000; $year <= 5001; $year++) {
|
||||
$leap = ($year === 5001) ? 'leap' : 'normal';
|
||||
echo "$leap year $year\n";
|
||||
for ($month = 1; $month <= 13; $month++) {
|
||||
$jd = jewishtojd($month, 1, $year);
|
||||
$hebrew = jdtojewish($jd, true);
|
||||
$hex = bin2hex($hebrew);
|
||||
echo "$hex\n";
|
||||
}
|
||||
echo "\n";
|
||||
}
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
normal year 5000
|
||||
e020faf9f8e920e4
|
||||
e020e7f9e5ef20e4
|
||||
e020ebf1ece520e4
|
||||
e020e8e1fa20e4
|
||||
e020f9e1e820e4
|
||||
e020e0e3f820e02720e4
|
||||
e020e0e3f820e12720e4
|
||||
e020f0e9f1ef20e4
|
||||
e020e0e9e9f820e4
|
||||
e020f1e9e5ef20e4
|
||||
e020faeee5e620e4
|
||||
e020e0e120e4
|
||||
e020e0ece5ec20e4
|
||||
|
||||
leap year 5001
|
||||
e020faf9f8e920e4e0
|
||||
e020e7f9e5ef20e4e0
|
||||
e020ebf1ece520e4e0
|
||||
e020e8e1fa20e4e0
|
||||
e020f9e1e820e4e0
|
||||
e020e0e3f820e4e0
|
||||
e020e0e3f820e4e0
|
||||
e020f0e9f1ef20e4e0
|
||||
e020e0e9e9f820e4e0
|
||||
e020f1e9e5ef20e4e0
|
||||
e020faeee5e620e4e0
|
||||
e020e0e120e4e0
|
||||
e020e0ece5ec20e4e0
|
||||
|
||||
===DONE===
|
||||
@@ -82,7 +82,7 @@ static void com_iter_get_key(zend_object_iterator *iter, zval *key)
|
||||
}
|
||||
}
|
||||
|
||||
static void com_iter_move_forwards(zend_object_iterator *iter)
|
||||
static int com_iter_move_forwards(zend_object_iterator *iter)
|
||||
{
|
||||
struct php_com_iterator *I = (struct php_com_iterator*)Z_PTR(iter->data);
|
||||
unsigned long n_fetched;
|
||||
@@ -103,18 +103,18 @@ static void com_iter_move_forwards(zend_object_iterator *iter)
|
||||
} else {
|
||||
/* indicate that there are no more items */
|
||||
I->key = (ulong)-1;
|
||||
return;
|
||||
return FAILURE;
|
||||
}
|
||||
} else {
|
||||
/* safe array */
|
||||
if (I->key >= (ULONG) I->sa_max) {
|
||||
I->key = (ulong)-1;
|
||||
return;
|
||||
return FAILURE;
|
||||
}
|
||||
I->key++;
|
||||
if (php_com_safearray_get_elem(&I->safe_array, &I->v, (LONG)I->key) == 0) {
|
||||
I->key = (ulong)-1;
|
||||
return;
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,6 +122,7 @@ static void com_iter_move_forwards(zend_object_iterator *iter)
|
||||
php_com_zval_from_variant(&ptr, &I->v, I->code_page);
|
||||
/* php_com_wrap_variant(ptr, &I->v, I->code_page); */
|
||||
ZVAL_COPY_VALUE(&I->zdata, &ptr);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -514,13 +514,15 @@ static void saproxy_iter_get_key(zend_object_iterator *iter, zval *key)
|
||||
}
|
||||
}
|
||||
|
||||
static void saproxy_iter_move_forwards(zend_object_iterator *iter)
|
||||
static int saproxy_iter_move_forwards(zend_object_iterator *iter)
|
||||
{
|
||||
php_com_saproxy_iter *I = (php_com_saproxy_iter*)Z_PTR(iter->data);
|
||||
|
||||
if (++I->key >= I->imax) {
|
||||
I->key = -1;
|
||||
return FAILURE;
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
static zend_object_iterator_funcs saproxy_iter_funcs = {
|
||||
|
||||
@@ -223,9 +223,9 @@ PHP_COM_DOTNET_API int php_com_import_typelib(ITypeLib *TL, int mode, int codepa
|
||||
}
|
||||
|
||||
/* Type-library stuff */
|
||||
void php_com_typelibrary_dtor(zval *pDest)
|
||||
void php_com_typelibrary_dtor(void *pDest)
|
||||
{
|
||||
ITypeLib **Lib = (ITypeLib**)Z_PTR_P(pDest);
|
||||
ITypeLib **Lib = (ITypeLib**)pDest;
|
||||
ITypeLib_Release(*Lib);
|
||||
}
|
||||
|
||||
|
||||
@@ -1012,13 +1012,13 @@ PHP_FUNCTION(variant_date_from_timestamp)
|
||||
tzset();
|
||||
ttstamp = timestamp;
|
||||
tmv = localtime(&ttstamp);
|
||||
|
||||
#if ZEND_ENABLE_ZVAL_LONG64
|
||||
/* Invalid after 23:59:59, December 31, 3000, UTC */
|
||||
if (!tmv) {
|
||||
php_error_docref(NULL, E_WARNING, "Invalid timestamp " ZEND_LONG_FMT, timestamp);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
#endif
|
||||
memset(&systime, 0, sizeof(systime));
|
||||
|
||||
systime.wDay = tmv->tm_mday;
|
||||
|
||||
@@ -174,7 +174,7 @@ PHP_COM_DOTNET_API ITypeLib *php_com_load_typelib_via_cache(char *search_string,
|
||||
PHP_COM_DOTNET_API ITypeLib *php_com_load_typelib(char *search_string, int codepage);
|
||||
PHP_COM_DOTNET_API int php_com_import_typelib(ITypeLib *TL, int mode,
|
||||
int codepage);
|
||||
void php_com_typelibrary_dtor(zval *pDest);
|
||||
void php_com_typelibrary_dtor(void *pDest);
|
||||
ITypeInfo *php_com_locate_typeinfo(char *typelibname, php_com_dotnet_object *obj, char *dispname, int sink);
|
||||
int php_com_process_typeinfo(ITypeInfo *typeinfo, HashTable *id_to_name, int printdef, GUID *guid, int codepage);
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ Bug #72498 variant_date_from_timestamp null dereference
|
||||
--SKIPIF--
|
||||
<?php # vim:ft=php
|
||||
if (!extension_loaded("com_dotnet")) print "skip COM/.Net support not present";
|
||||
if (PHP_INT_SIZE != 8) print "skip 64-bit only";
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
+1
-16
@@ -4,28 +4,13 @@
|
||||
ARG_WITH("curl", "cURL support", "no");
|
||||
|
||||
if (PHP_CURL != "no") {
|
||||
var ver_num = NaN;
|
||||
var f = PHP_PHP_BUILD + "/include/curl/curlver.h";
|
||||
if (FSO.FileExists(f)) {
|
||||
var reg = /LIBCURL_VERSION_NUM\s+(0x[a-z0-9]+)/gi;
|
||||
var m = reg.exec(file_get_contents(PHP_PHP_BUILD + "/include/curl/curlver.h"));
|
||||
if (!!m && m.length >= 2) {
|
||||
ver_num = parseInt(m[1]);
|
||||
}
|
||||
}
|
||||
|
||||
if (CHECK_LIB("libcurl_a.lib;libcurl.lib", "curl", PHP_CURL) &&
|
||||
CHECK_HEADER_ADD_INCLUDE("curl/easy.h", "CFLAGS_CURL") &&
|
||||
SETUP_OPENSSL("curl", PHP_CURL) > 0 &&
|
||||
CHECK_LIB("winmm.lib", "curl", PHP_CURL) &&
|
||||
CHECK_LIB("wldap32.lib", "curl", PHP_CURL) &&
|
||||
(((PHP_ZLIB=="no") && (CHECK_LIB("zlib_a.lib;zlib.lib", "curl", PHP_CURL))) ||
|
||||
(PHP_ZLIB_SHARED && CHECK_LIB("zlib.lib", "curl", PHP_CURL)) || (PHP_ZLIB == "yes" && (!PHP_ZLIB_SHARED))) &&
|
||||
!isNaN(ver_num) &&
|
||||
(ver_num <= parseInt("0x073b00") || ver_num > parseInt("0x073b00") &&
|
||||
CHECK_LIB("normaliz.lib", "curl", PHP_CURL) &&
|
||||
CHECK_LIB("libssh2.lib", "curl", PHP_CURL) &&
|
||||
CHECK_LIB("nghttp2.lib", "curl", PHP_CURL))
|
||||
(PHP_ZLIB_SHARED && CHECK_LIB("zlib.lib", "curl", PHP_CURL)) || (PHP_ZLIB == "yes" && (!PHP_ZLIB_SHARED)))
|
||||
) {
|
||||
EXTENSION("curl", "interface.c multi.c share.c curl_file.c");
|
||||
AC_DEFINE('HAVE_CURL', 1, 'Have cURL library');
|
||||
|
||||
+2
-18
@@ -190,7 +190,6 @@ PHP_FUNCTION(curl_multi_remove_handle)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#if LIBCURL_VERSION_NUM < 0x071c00
|
||||
static void _make_timeval_struct(struct timeval *to, double timeout) /* {{{ */
|
||||
{
|
||||
unsigned long conv;
|
||||
@@ -200,7 +199,6 @@ static void _make_timeval_struct(struct timeval *to, double timeout) /* {{{ */
|
||||
to->tv_usec = conv % 1000000;
|
||||
}
|
||||
/* }}} */
|
||||
#endif
|
||||
|
||||
/* {{{ proto int curl_multi_select(resource mh[, double timeout])
|
||||
Get all the sockets associated with the cURL extension, which can then be "selected" */
|
||||
@@ -208,16 +206,12 @@ PHP_FUNCTION(curl_multi_select)
|
||||
{
|
||||
zval *z_mh;
|
||||
php_curlm *mh;
|
||||
double timeout = 1.0;
|
||||
#if LIBCURL_VERSION_NUM >= 0x071c00 /* Available since 7.28.0 */
|
||||
int numfds = 0;
|
||||
#else
|
||||
fd_set readfds;
|
||||
fd_set writefds;
|
||||
fd_set exceptfds;
|
||||
int maxfd;
|
||||
double timeout = 1.0;
|
||||
struct timeval to;
|
||||
#endif
|
||||
CURLMcode error = CURLM_OK;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|d", &z_mh, &timeout) == FAILURE) {
|
||||
@@ -228,15 +222,6 @@ PHP_FUNCTION(curl_multi_select)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
#if LIBCURL_VERSION_NUM >= 0x071c00 /* Available since 7.28.0 */
|
||||
error = curl_multi_wait(mh->multi, NULL, 0, (unsigned long) timeout * 1000.0, &numfds);
|
||||
if (CURLM_OK != error) {
|
||||
SAVE_CURLM_ERROR(mh, error);
|
||||
RETURN_LONG(-1);
|
||||
}
|
||||
|
||||
RETURN_LONG(numfds);
|
||||
#else
|
||||
_make_timeval_struct(&to, timeout);
|
||||
|
||||
FD_ZERO(&readfds);
|
||||
@@ -250,7 +235,6 @@ PHP_FUNCTION(curl_multi_select)
|
||||
RETURN_LONG(-1);
|
||||
}
|
||||
RETURN_LONG(select(maxfd + 1, &readfds, &writefds, &exceptfds, &to));
|
||||
#endif
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -348,7 +332,7 @@ PHP_FUNCTION(curl_multi_info_read)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
if (zmsgs_in_queue) {
|
||||
zval_ptr_dtor(zmsgs_in_queue);
|
||||
zval_dtor(zmsgs_in_queue);
|
||||
ZVAL_LONG(zmsgs_in_queue, queued_msgs);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,8 +30,7 @@ echo "Ok\n";
|
||||
<?php @unlink(dirname(__FILE__) . '/bug48203.tmp'); ?>
|
||||
--EXPECTF--
|
||||
Warning: curl_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %s on line %d
|
||||
%A
|
||||
Hello World!
|
||||
Hello World!* Closing connection 0
|
||||
Ok
|
||||
Hello World!Ok
|
||||
%A
|
||||
|
||||
@@ -65,3 +65,4 @@ Hello World!Ok for CURLOPT_FILE
|
||||
|
||||
%AOk for CURLOPT_INFILE
|
||||
===DONE===
|
||||
%A
|
||||
@@ -13,23 +13,17 @@ function curl_cli_server_start() {
|
||||
$doc_root = __DIR__;
|
||||
$router = "responder/get.php";
|
||||
|
||||
if (substr(PHP_OS, 0, 3) == 'WIN') {
|
||||
$descriptorspec = array(
|
||||
0 => STDIN,
|
||||
1 => STDOUT,
|
||||
2 => array("pipe", "w"),
|
||||
);
|
||||
$descriptorspec = array(
|
||||
0 => STDIN,
|
||||
1 => STDOUT,
|
||||
2 => STDERR,
|
||||
);
|
||||
|
||||
if (substr(PHP_OS, 0, 3) == 'WIN') {
|
||||
$cmd = "{$php_executable} -t {$doc_root} -n -S " . PHP_CURL_SERVER_ADDRESS;
|
||||
$cmd .= " {$router}";
|
||||
$handle = proc_open(addslashes($cmd), $descriptorspec, $pipes, $doc_root, NULL, array("bypass_shell" => true, "suppress_errors" => true));
|
||||
} else {
|
||||
$descriptorspec = array(
|
||||
0 => STDIN,
|
||||
1 => STDOUT,
|
||||
2 => STDERR,
|
||||
);
|
||||
|
||||
$cmd = "exec {$php_executable} -t {$doc_root} -n -S " . PHP_CURL_SERVER_ADDRESS;
|
||||
$cmd .= " {$router}";
|
||||
$cmd .= " 2>/dev/null";
|
||||
|
||||
+1405
-1414
File diff suppressed because it is too large.
Load diff
+5
-6
@@ -161,7 +161,7 @@ ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_date_create, 0, 0, 0)
|
||||
ZEND_ARG_INFO(0, time)
|
||||
ZEND_ARG_INFO(0, timezone)
|
||||
ZEND_ARG_INFO(0, object)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_date_create_from_format, 0, 0, 2)
|
||||
@@ -2021,9 +2021,9 @@ static int date_interval_has_property(zval *object, zval *member, int type, void
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
prop = date_interval_read_property(object, member, BP_VAR_IS, cache_slot, &rv);
|
||||
|
||||
|
||||
if (prop != &EG(uninitialized_zval)) {
|
||||
if (type == 2) {
|
||||
retval = 1;
|
||||
@@ -2041,7 +2041,7 @@ static int date_interval_has_property(zval *object, zval *member, int type, void
|
||||
}
|
||||
|
||||
return retval;
|
||||
|
||||
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -2390,7 +2390,7 @@ static HashTable *date_object_get_debug_info_timezone(zval *object, int *is_temp
|
||||
|
||||
*is_temp = 1;
|
||||
ht = zend_array_dup(props);
|
||||
|
||||
|
||||
ZVAL_LONG(&zv, tzobj->type);
|
||||
zend_hash_str_update(ht, "timezone_type", sizeof("timezone_type")-1, &zv);
|
||||
|
||||
@@ -4276,7 +4276,6 @@ static zval *date_interval_get_property_ptr_ptr(zval *object, zval *member, int
|
||||
zend_binary_strcmp("h", sizeof("h") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 ||
|
||||
zend_binary_strcmp("i", sizeof("i") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 ||
|
||||
zend_binary_strcmp("s", sizeof("s") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 ||
|
||||
zend_binary_strcmp("f", sizeof("f") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 ||
|
||||
zend_binary_strcmp("days", sizeof("days") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 ||
|
||||
zend_binary_strcmp("invert", sizeof("invert") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0) {
|
||||
/* Fallback to read_property. */
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
--TEST--
|
||||
Bug #76462 Undefined property: DateInterval::$f
|
||||
--FILE--
|
||||
<?php
|
||||
$buggy = new DateInterval('P0Y');
|
||||
$buggy->f += 0.01;
|
||||
|
||||
$ok = new DateInterval('P0Y');
|
||||
$ok->f = $ok->f + 0.01;
|
||||
|
||||
var_dump($buggy->f);
|
||||
var_dump($ok->f);
|
||||
?>
|
||||
--EXPECT--
|
||||
float(0.01)
|
||||
float(0.01)
|
||||
@@ -42,11 +42,7 @@ struct _notationIterator {
|
||||
xmlNotation *notation;
|
||||
};
|
||||
|
||||
#if LIBXML_VERSION >= 20908
|
||||
static void itemHashScanner (void *payload, void *data, const xmlChar *name) /* {{{ */
|
||||
#else
|
||||
static void itemHashScanner (void *payload, void *data, xmlChar *name)
|
||||
#endif
|
||||
static void itemHashScanner (void *payload, void *data, xmlChar *name) /* {{{ */
|
||||
{
|
||||
nodeIterator *priv = (nodeIterator *)data;
|
||||
|
||||
|
||||
@@ -598,6 +598,7 @@ PHP_MINIT_FUNCTION(dom)
|
||||
memcpy(&dom_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
|
||||
dom_object_handlers.offset = XtOffsetOf(dom_object, std);
|
||||
dom_object_handlers.free_obj = dom_objects_free_storage;
|
||||
dom_object_handlers.clone_obj = dom_objects_store_clone_obj;
|
||||
dom_object_handlers.read_property = dom_read_property;
|
||||
dom_object_handlers.write_property = dom_write_property;
|
||||
dom_object_handlers.get_property_ptr_ptr = dom_get_property_ptr_ptr;
|
||||
|
||||
@@ -719,7 +719,7 @@ PHP_FUNCTION(enchant_dict_quick_check)
|
||||
}
|
||||
|
||||
if (sugg) {
|
||||
zval_ptr_dtor(sugg);
|
||||
zval_dtor(sugg);
|
||||
array_init(sugg);
|
||||
}
|
||||
|
||||
|
||||
+3
-9
@@ -1704,7 +1704,7 @@ static void exif_iif_add_value(image_info_type *image_info, int section_index, c
|
||||
case TAG_FMT_UNDEFINED:
|
||||
if (value) {
|
||||
if (tag == TAG_MAKER_NOTE) {
|
||||
length = (int) php_strnlen(value, length);
|
||||
length = MIN(length, strlen(value));
|
||||
}
|
||||
|
||||
/* do not recompute length here */
|
||||
@@ -2536,10 +2536,7 @@ static void exif_thumbnail_extract(image_info_type *ImageInfo, char *offset, siz
|
||||
return;
|
||||
}
|
||||
/* Check to make sure we are not going to go past the ExifLength */
|
||||
if (ImageInfo->Thumbnail.size > length
|
||||
|| (ImageInfo->Thumbnail.offset + ImageInfo->Thumbnail.size) > length
|
||||
|| ImageInfo->Thumbnail.offset > length - ImageInfo->Thumbnail.size
|
||||
) {
|
||||
if ((ImageInfo->Thumbnail.offset + ImageInfo->Thumbnail.size) > length) {
|
||||
EXIF_ERRLOG_THUMBEOF(ImageInfo)
|
||||
return;
|
||||
}
|
||||
@@ -2718,7 +2715,6 @@ static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * valu
|
||||
int NumDirEntries, old_motorola_intel, offset_diff;
|
||||
const maker_note_type *maker_note;
|
||||
char *dir_start;
|
||||
int data_len;
|
||||
|
||||
for (i=0; i<=sizeof(maker_note_array)/sizeof(maker_note_type); i++) {
|
||||
if (i==sizeof(maker_note_array)/sizeof(maker_note_type)) {
|
||||
@@ -2773,7 +2769,6 @@ static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * valu
|
||||
switch (maker_note->offset_mode) {
|
||||
case MN_OFFSET_MAKER:
|
||||
offset_base = value_ptr;
|
||||
data_len = value_len;
|
||||
break;
|
||||
case MN_OFFSET_GUESS:
|
||||
if (maker_note->offset + 10 + 4 >= value_len) {
|
||||
@@ -2790,7 +2785,6 @@ static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * valu
|
||||
return FALSE;
|
||||
}
|
||||
offset_base = value_ptr + offset_diff;
|
||||
data_len = value_len - offset_diff;
|
||||
break;
|
||||
default:
|
||||
case MN_OFFSET_NORMAL:
|
||||
@@ -2804,7 +2798,7 @@ static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * valu
|
||||
|
||||
for (de=0;de<NumDirEntries;de++) {
|
||||
if (!exif_process_IFD_TAG(ImageInfo, dir_start + 2 + 12 * de,
|
||||
offset_base, data_len, displacement, section_index, 0, maker_note->tag_table)) {
|
||||
offset_base, IFDlength, displacement, section_index, 0, maker_note->tag_table)) {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
--TEST--
|
||||
Bug #76130 (Heap Buffer Overflow (READ: 1786) in exif_iif_add_value)
|
||||
--DESCRIPTION--
|
||||
This test is meant to exhibit memory issues with the `-m` option. Since a lot of
|
||||
notices and warnings are to be expected anyway, we suppress these, since the are
|
||||
not relevant for this test.
|
||||
--INI--
|
||||
error_reporting=E_ALL & ~E_WARNING & ~E_NOTICE
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('exif')) die('skip exif extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
exif_read_data(__DIR__ . '/bug76130_1.jpg');
|
||||
exif_read_data(__DIR__ . '/bug76130_2.jpg');
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
===DONE===
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,19 +0,0 @@
|
||||
--TEST--
|
||||
Bug #76423 (Int Overflow lead to Heap OverFlow in exif_thumbnail_extract of exif.c)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('exif')) die('skip exif extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
exif_read_data(__DIR__ . '/bug76423.jpg', 0, true, true);
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
|
||||
Warning: exif_read_data(%s.jpg): Thumbnail goes IFD boundary or end of file reached in %s on line %d
|
||||
|
||||
Warning: exif_read_data(%s.jpg): File structure corrupted in %s on line %d
|
||||
|
||||
Warning: exif_read_data(%s.jpg): Invalid JPEG file in %s on line %d
|
||||
===DONE===
|
||||
Binary file not shown.
@@ -1,79 +0,0 @@
|
||||
--TEST--
|
||||
Bug 76557 (heap-buffer-overflow (READ of size 48) while reading exif data)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded('exif')) print 'skip exif extension not available';?>
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(count(exif_read_data(dirname(__FILE__) . "/bug76557.jpg")));
|
||||
?>
|
||||
DONE
|
||||
--EXPECTF--
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x010F=Make ): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x8769=Exif_IFD_Po): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x927C=MakerNote ): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal pointer offset(x30303030 + x30303030 = x60606060 > x00EE) in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): File structure corrupted in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Invalid JPEG file in %sbug76557.php on line %d
|
||||
int(1)
|
||||
DONE
|
||||
+3
-3
@@ -120,9 +120,9 @@ dnl [ --with-$extname Include $extname support])
|
||||
|
||||
dnl Otherwise use enable:
|
||||
|
||||
PHP_ARG_ENABLE($extname, whether to enable $extname support,
|
||||
dnl PHP_ARG_ENABLE($extname, whether to enable $extname support,
|
||||
dnl Make sure that the comment is aligned:
|
||||
[ --enable-$extname Enable $extname support])
|
||||
dnl [ --enable-$extname Enable $extname support])
|
||||
|
||||
if test "\$PHP_$EXTNAME" != "no"; then
|
||||
dnl Write more examples of tests here...
|
||||
@@ -179,7 +179,7 @@ cat >config.w32 <<eof
|
||||
// ARG_WITH("$extname", "for $extname support", "no");
|
||||
|
||||
// Otherwise, use ARG_ENABLE
|
||||
ARG_ENABLE("$extname", "enable $extname support", "no");
|
||||
// ARG_ENABLE("$extname", "enable $extname support", "no");
|
||||
|
||||
if (PHP_$EXTNAME != "no") {
|
||||
EXTENSION("$extname", "$extname.c", PHP_EXTNAME_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
|
||||
|
||||
@@ -621,9 +621,6 @@ static void php_filter_call(zval *filtered, zend_long filter, zval *filter_args,
|
||||
}
|
||||
|
||||
if ((option = zend_hash_str_find(HASH_OF(filter_args), "options", sizeof("options") - 1)) != NULL) {
|
||||
/* avoid reference type */
|
||||
ZVAL_DEREF(option);
|
||||
|
||||
if (filter != FILTER_CALLBACK) {
|
||||
if (Z_TYPE_P(option) == IS_ARRAY) {
|
||||
options = option;
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
--TEST--
|
||||
Bug #76366 (references in sub-array for filtering breaks the filter)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('filter')) die('skip filter extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
#array to filter
|
||||
$data = ['foo' => 6];
|
||||
|
||||
#filter args
|
||||
$args = [
|
||||
'foo'=> [
|
||||
'filter' => FILTER_VALIDATE_INT,
|
||||
'flags' => FILTER_FORCE_ARRAY
|
||||
]
|
||||
];
|
||||
|
||||
$args['foo']['options'] = [];
|
||||
|
||||
#create reference
|
||||
$options = &$args['foo']['options'];
|
||||
|
||||
#set options
|
||||
$options['min_range'] = 1;
|
||||
$options['max_range'] = 5;
|
||||
|
||||
#show the filter result
|
||||
var_dump(filter_var_array($data, $args));
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
bool(false)
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -141,7 +141,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_ftp_nb_fget, 0, 0, 4)
|
||||
ZEND_ARG_INFO(0, resumepos)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_ftp_pasv, 0, 0, 2)
|
||||
ZEND_BEGIN_ARG_INFO(arginfo_ftp_pasv, 0)
|
||||
ZEND_ARG_INFO(0, ftp)
|
||||
ZEND_ARG_INFO(0, pasv)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
+17
-29
@@ -335,7 +335,7 @@ if ($pid) {
|
||||
fputs($s, "550 No file named \"{$matches [1]}\"\r\n");
|
||||
break;
|
||||
}
|
||||
}elseif (preg_match('/^RETR ([\/]*[\w\h]+)/', $buf, $matches)) {
|
||||
}elseif (preg_match('/^RETR ([\w\h]+)/', $buf, $matches)) {
|
||||
if(!empty($pasv)){
|
||||
;
|
||||
}
|
||||
@@ -391,10 +391,6 @@ if ($pid) {
|
||||
fputs($fs, "This is line $i of the test data.\n");
|
||||
}
|
||||
fputs($s, "226 Closing data Connection.\r\n");
|
||||
break;
|
||||
case "/bug73457":
|
||||
fputs($s, "150 File status okay; about to open data connection.\r\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
fputs($s, "550 {$matches[1]}: No such file or directory \r\n");
|
||||
@@ -409,35 +405,29 @@ if ($pid) {
|
||||
$host = "127.0.0.1";
|
||||
$i=0;
|
||||
|
||||
if (empty($bug73457)) {
|
||||
do {
|
||||
if (!empty($ssl)) {
|
||||
$soc = @stream_socket_server("tcp://127.0.0.1:$pasv_port", $errno, $errstr, STREAM_SERVER_BIND|STREAM_SERVER_LISTEN, $context);
|
||||
} else {
|
||||
$soc = @stream_socket_server("tcp://127.0.0.1:$pasv_port");
|
||||
}
|
||||
/* Could bind port, Try another port */
|
||||
if (!$soc) {
|
||||
$pasv_port = rand(50000, 65535);
|
||||
}
|
||||
$i++;
|
||||
} while ($i<10 && !$soc);
|
||||
|
||||
if (!$soc) {
|
||||
echo "$errstr ($errno)\n";
|
||||
die("could not bind passive port\n");
|
||||
do {
|
||||
if (!empty($ssl)) {
|
||||
$soc = @stream_socket_server("tcp://127.0.0.1:$pasv_port", $errno, $errstr, STREAM_SERVER_BIND|STREAM_SERVER_LISTEN, $context);
|
||||
} else {
|
||||
$soc = @stream_socket_server("tcp://127.0.0.1:$pasv_port");
|
||||
}
|
||||
} else {
|
||||
$pasv_port=1234;
|
||||
/* Could bind port, Try another port */
|
||||
if (!$soc) {
|
||||
$pasv_port = rand(50000, 65535);
|
||||
}
|
||||
$i++;
|
||||
} while ($i<10 && !$soc);
|
||||
|
||||
if (!$soc) {
|
||||
echo "$errstr ($errno)\n";
|
||||
die("could not bind passive port\n");
|
||||
}
|
||||
|
||||
$p2 = $pasv_port % ((int) 1 << 8);
|
||||
$p1 = ($pasv_port-$p2)/((int) 1 << 8);
|
||||
fputs($s, "227 Entering Passive Mode. (127,0,0,1,{$p1},{$p2})\r\n");
|
||||
|
||||
if (empty($bug73457)) {
|
||||
$pasvs = stream_socket_accept($soc,10);
|
||||
}
|
||||
$pasvs = stream_socket_accept($soc,10);
|
||||
|
||||
} elseif (preg_match('/^EPSV/', $buf, $matches)) {
|
||||
fputs($s, "550 Extended passsive mode not supported.\r\n");
|
||||
@@ -465,8 +455,6 @@ if ($pid) {
|
||||
fputs($s, "350 OK\r\n");
|
||||
}elseif (preg_match('/^SIZE largefile/', $buf)) {
|
||||
fputs($s, "213 5368709120\r\n");
|
||||
}elseif (preg_match('/^SIZE \/bug73457/', $buf)) {
|
||||
fputs($s, "213 10\r\n");
|
||||
}else {
|
||||
fputs($s, "500 Syntax error, command unrecognized.\r\n");
|
||||
dump_and_exit($buf);
|
||||
|
||||
+2
-2
@@ -819,7 +819,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_imageaffinematrixconcat, 0)
|
||||
ZEND_ARG_INFO(0, m2)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_imagesetinterpolation, 0, 0, 1)
|
||||
ZEND_BEGIN_ARG_INFO(arginfo_imagesetinterpolation, 0)
|
||||
ZEND_ARG_INFO(0, im)
|
||||
ZEND_ARG_INFO(0, method)
|
||||
ZEND_END_ARG_INFO()
|
||||
@@ -4720,7 +4720,7 @@ PHP_FUNCTION(imagescale)
|
||||
}
|
||||
}
|
||||
|
||||
if (tmp_h <= 0 || tmp_h > INT_MAX || tmp_w <= 0 || tmp_w > INT_MAX) {
|
||||
if (tmp_h <= 0 || tmp_w <= 0) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -1392,6 +1392,7 @@ void gdImageDashedLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color
|
||||
} else {
|
||||
wid = 1;
|
||||
}
|
||||
wid = (int)(thick * sin(atan2(dy, dx)));
|
||||
vert = 1;
|
||||
|
||||
d = 2 * dy - dx;
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
--TEST--
|
||||
Bug #52070 (imagedashedline() - dashed line sometimes is not visible)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) die('skip gd extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$im = imagecreate(1200, 800);
|
||||
$background_color = imagecolorallocate($im, 40, 40, 40);
|
||||
$color = imagecolorallocate($im, 255, 255, 255);
|
||||
imagedashedline($im, 800, 400, 300, 400, $color);
|
||||
imagedashedline($im, 800, 400, 300, 800, $color);
|
||||
imagedashedline($im, 800, 400, 400, 800, $color);
|
||||
imagedashedline($im, 800, 400, 500, 800, $color);
|
||||
imagedashedline($im, 800, 400, 600, 800, $color);
|
||||
imagedashedline($im, 800, 400, 700, 800, $color);
|
||||
imagedashedline($im, 800, 400, 800, 800, $color);
|
||||
include_once __DIR__ . '/func.inc';
|
||||
test_image_equals_file(__DIR__ . '/bug52070.png', $im);
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
The images are equal.
|
||||
===DONE===
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.2 KiB |
@@ -1,20 +0,0 @@
|
||||
--TEST--
|
||||
Bug #73957 (signed integer conversion in imagescale())
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) die('skip gd extension not available');
|
||||
if (PHP_INT_SIZE != 8) die('skip this test is for 64bit platforms only');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$im = imagecreate(8, 8);
|
||||
$im = imagescale($im, 0x100000001, 1);
|
||||
var_dump($im);
|
||||
if ($im) { // which is not supposed to happen
|
||||
var_dump(imagesx($im));
|
||||
}
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
bool(false)
|
||||
===DONE===
|
||||
@@ -35,6 +35,10 @@ if test "$PHP_GETTEXT" != "no"; then
|
||||
PHP_NEW_EXTENSION(gettext, gettext.c, $ext_shared)
|
||||
PHP_SUBST(GETTEXT_SHARED_LIBADD)
|
||||
|
||||
if test -n "$GETTEXT_LIBS"; then
|
||||
PHP_ADD_LIBRARY_WITH_PATH($GETTEXT_LIBS, $GETTEXT_LIBDIR, GETTEXT_SHARED_LIBADD)
|
||||
fi
|
||||
|
||||
PHP_ADD_INCLUDE($GETTEXT_INCDIR)
|
||||
|
||||
AC_CHECK_LIB($GETTEXT_CHECK_IN_LIB, ngettext, [AC_DEFINE(HAVE_NGETTEXT, 1, [ ])])
|
||||
@@ -43,7 +47,4 @@ if test "$PHP_GETTEXT" != "no"; then
|
||||
AC_CHECK_LIB($GETTEXT_CHECK_IN_LIB, bind_textdomain_codeset, [AC_DEFINE(HAVE_BIND_TEXTDOMAIN_CODESET, 1, [ ])])
|
||||
LDFLAGS=$O_LDFLAGS
|
||||
|
||||
if test -n "$GETTEXT_LIBS"; then
|
||||
PHP_ADD_LIBRARY_WITH_PATH($GETTEXT_LIBS, $GETTEXT_LIBDIR, GETTEXT_SHARED_LIBADD)
|
||||
fi
|
||||
fi
|
||||
@@ -1,10 +0,0 @@
|
||||
--TEST--
|
||||
Bug #74670: Integer Underflow when unserializing GMP and possible other classes
|
||||
--FILE--
|
||||
<?php
|
||||
$str = 'C:3:"GMP":4:{s:6666666666:""}';
|
||||
var_dump(unserialize($str));
|
||||
?>
|
||||
--EXPECTF--
|
||||
Notice: unserialize(): Error at offset 13 of 29 bytes in %s on line %d
|
||||
bool(false)
|
||||
+2
-2
@@ -1956,8 +1956,8 @@ ZEND_FUNCTION(gmp_setbit)
|
||||
php_error_docref(NULL, E_WARNING, "Index must be greater than or equal to zero");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
if (index / GMP_NUMB_BITS >= INT_MAX) {
|
||||
php_error_docref(NULL, E_WARNING, "Index must be less than %d * %d", INT_MAX, GMP_NUMB_BITS);
|
||||
if (index / GMP_NUMB_BITS >= INT_MAX ) {
|
||||
php_error_docref(NULL, E_WARNING, "Index must be less than %ld * %ld", INT_MAX, GMP_NUMB_BITS);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ try {
|
||||
} catch (Exception $e) { var_dump($e->getMessage()); }
|
||||
|
||||
try {
|
||||
unserialize('C:3:"GMP":9:{s:2:"42";}');
|
||||
unserialize('C:3:"GMP":8:{s:2:"42";}');
|
||||
} catch (Exception $e) { var_dump($e->getMessage()); }
|
||||
|
||||
?>
|
||||
|
||||
+1
-1
@@ -1292,7 +1292,7 @@ ZEND_END_ARG_INFO()
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_hash_update_file, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, context)
|
||||
ZEND_ARG_INFO(0, filename)
|
||||
ZEND_ARG_INFO(0, stream_context)
|
||||
ZEND_ARG_INFO(0, context)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_hash_final, 0, 0, 1)
|
||||
|
||||
+5
-31
@@ -466,7 +466,7 @@ static php_iconv_err_t _php_iconv_appendl(smart_str *d, const char *s, size_t l,
|
||||
|
||||
if (in_p != NULL) {
|
||||
while (in_left > 0) {
|
||||
out_left = buf_growth;
|
||||
out_left = buf_growth - out_left;
|
||||
smart_str_alloc(d, out_left, 0);
|
||||
|
||||
out_p = ZSTR_VAL((d)->s) + ZSTR_LEN((d)->s);
|
||||
@@ -500,7 +500,7 @@ static php_iconv_err_t _php_iconv_appendl(smart_str *d, const char *s, size_t l,
|
||||
}
|
||||
} else {
|
||||
for (;;) {
|
||||
out_left = buf_growth;
|
||||
out_left = buf_growth - out_left;
|
||||
smart_str_alloc(d, out_left, 0);
|
||||
|
||||
out_p = ZSTR_VAL((d)->s) + ZSTR_LEN((d)->s);
|
||||
@@ -1367,7 +1367,7 @@ static php_iconv_err_t _php_iconv_mime_encode(smart_str *pretval, const char *fn
|
||||
prev_in_left = ini_in_left = in_left;
|
||||
ini_in_p = in_p;
|
||||
|
||||
for (out_size = (char_cnt - 2); out_size > 0;) {
|
||||
for (out_size = (char_cnt - 2) / 3; out_size > 0;) {
|
||||
#if !ICONV_SUPPORTS_ERRNO
|
||||
size_t prev_out_left;
|
||||
#endif
|
||||
@@ -1431,7 +1431,7 @@ static php_iconv_err_t _php_iconv_mime_encode(smart_str *pretval, const char *fn
|
||||
break;
|
||||
}
|
||||
|
||||
out_size -= ((nbytes_required - (char_cnt - 2)) + 2) / 3;
|
||||
out_size -= ((nbytes_required - (char_cnt - 2)) + 1) / 3;
|
||||
in_left = ini_in_left;
|
||||
in_p = ini_in_p;
|
||||
}
|
||||
@@ -1544,10 +1544,7 @@ static php_iconv_err_t _php_iconv_mime_decode(smart_str *pretval, const char *st
|
||||
break;
|
||||
|
||||
default: /* first letter of a non-encoded word */
|
||||
err = _php_iconv_appendc(pretval, *p1, cd_pl);
|
||||
if (err != PHP_ICONV_ERR_SUCCESS) {
|
||||
goto out;
|
||||
}
|
||||
_php_iconv_appendc(pretval, *p1, cd_pl);
|
||||
encoded_word = NULL;
|
||||
if ((mode & PHP_ICONV_MIME_DECODE_STRICT)) {
|
||||
scan_stat = 12;
|
||||
@@ -1558,9 +1555,6 @@ static php_iconv_err_t _php_iconv_mime_decode(smart_str *pretval, const char *st
|
||||
|
||||
case 1: /* expecting a delimiter */
|
||||
if (*p1 != '?') {
|
||||
if (*p1 == '\r' || *p1 == '\n') {
|
||||
--p1;
|
||||
}
|
||||
err = _php_iconv_appendl(pretval, encoded_word, (size_t)((p1 + 1) - encoded_word), cd_pl);
|
||||
if (err != PHP_ICONV_ERR_SUCCESS) {
|
||||
goto out;
|
||||
@@ -1586,23 +1580,6 @@ static php_iconv_err_t _php_iconv_mime_decode(smart_str *pretval, const char *st
|
||||
case '*': /* new style delimiter: locale id follows */
|
||||
scan_stat = 10;
|
||||
break;
|
||||
|
||||
case '\r': case '\n': /* not an encoded-word */
|
||||
--p1;
|
||||
_php_iconv_appendc(pretval, '=', cd_pl);
|
||||
_php_iconv_appendc(pretval, '?', cd_pl);
|
||||
err = _php_iconv_appendl(pretval, csname, (size_t)((p1 + 1) - csname), cd_pl);
|
||||
if (err != PHP_ICONV_ERR_SUCCESS) {
|
||||
goto out;
|
||||
}
|
||||
csname = NULL;
|
||||
if ((mode & PHP_ICONV_MIME_DECODE_STRICT)) {
|
||||
scan_stat = 12;
|
||||
}
|
||||
else {
|
||||
scan_stat = 0;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (scan_stat != 2) {
|
||||
char tmpbuf[80];
|
||||
@@ -2681,9 +2658,6 @@ static int php_iconv_stream_filter_append_bucket(
|
||||
tcnt = 0;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
php_error_docref(NULL, E_WARNING, "iconv stream filter (\"%s\"=>\"%s\"): invalid multibyte sequence", self->from_charset, self->to_charset);
|
||||
goto out_failure;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
--TEST--
|
||||
Bug #55146 (iconv_mime_decode_headers() skips some headers)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('iconv')) die('skip iconv extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$headers = <<< HEADERS
|
||||
X-Header-One: H4sIAAAAAAAAA+NgFlsCAAA=
|
||||
X-Header-Two: XtLePq6GTMn8G68F0
|
||||
HEADERS;
|
||||
var_dump(iconv_mime_decode_headers($headers, ICONV_MIME_DECODE_CONTINUE_ON_ERROR));
|
||||
|
||||
$headers = <<< HEADERS
|
||||
X-Header-One: =
|
||||
X-Header-Two: XtLePq6GTMn8G68F0
|
||||
HEADERS;
|
||||
var_dump(iconv_mime_decode_headers($headers, ICONV_MIME_DECODE_STRICT));
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
array(2) {
|
||||
["X-Header-One"]=>
|
||||
string(24) "H4sIAAAAAAAAA+NgFlsCAAA="
|
||||
["X-Header-Two"]=>
|
||||
string(17) "XtLePq6GTMn8G68F0"
|
||||
}
|
||||
array(2) {
|
||||
["X-Header-One"]=>
|
||||
string(1) "="
|
||||
["X-Header-Two"]=>
|
||||
string(17) "XtLePq6GTMn8G68F0"
|
||||
}
|
||||
===DONE===
|
||||
@@ -1,23 +0,0 @@
|
||||
--TEST--
|
||||
Bug #60494 (iconv_mime_decode does ignore special characters)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('iconv')) die('skip iconv extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(iconv_mime_decode('ä'));
|
||||
var_dump(iconv_mime_decode('ö'));
|
||||
var_dump(iconv_mime_decode('ß'));
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
Notice: iconv_mime_decode(): Detected an illegal character in input string in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Notice: iconv_mime_decode(): Detected an illegal character in input string in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Notice: iconv_mime_decode(): Detected an illegal character in input string in %s on line %d
|
||||
bool(false)
|
||||
===DONE===
|
||||
@@ -1,71 +0,0 @@
|
||||
--TEST--
|
||||
Bug #63839 (iconv_mime_decode_headers function is skipping headers)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('iconv')) die('skip iconv extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$headers = 'From: "xyz" <xyz@xyz.com>
|
||||
To: <xyz@xyz.com>
|
||||
Subject: Reply Is? white side-LED =? in Help
|
||||
Date: Sat, 22 Dec 2012
|
||||
Message-ID: <006f01cde00e$d9f79da0$8de6d8e0>
|
||||
MIME-Version: 1.0
|
||||
Content-Type: multipart/alternative;
|
||||
boundary="----=_NextPart_000_0070_01CDE03C.F3AFD9A0"
|
||||
X-Mailer: Microsoft Office Outlook 12.0
|
||||
Thread-Index: Ac3gDtcH2huHjzYcQVmFJPPoWjJogA==
|
||||
Content-Language: en-us
|
||||
|
||||
';
|
||||
var_dump(iconv_mime_decode_headers($headers, ICONV_MIME_DECODE_CONTINUE_ON_ERROR));
|
||||
var_dump(iconv_mime_decode_headers($headers, ICONV_MIME_DECODE_STRICT));
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
array(10) {
|
||||
["From"]=>
|
||||
string(19) ""xyz" <xyz@xyz.com>"
|
||||
["To"]=>
|
||||
string(13) "<xyz@xyz.com>"
|
||||
["Subject"]=>
|
||||
string(35) "Reply Is? white side-LED =? in Help"
|
||||
["Date"]=>
|
||||
string(16) "Sat, 22 Dec 2012"
|
||||
["Message-ID"]=>
|
||||
string(32) "<006f01cde00e$d9f79da0$8de6d8e0>"
|
||||
["MIME-Version"]=>
|
||||
string(3) "1.0"
|
||||
["Content-Type"]=>
|
||||
string(75) "multipart/alternative; boundary="----=_NextPart_000_0070_01CDE03C.F3AFD9A0""
|
||||
["X-Mailer"]=>
|
||||
string(29) "Microsoft Office Outlook 12.0"
|
||||
["Thread-Index"]=>
|
||||
string(32) "Ac3gDtcH2huHjzYcQVmFJPPoWjJogA=="
|
||||
["Content-Language"]=>
|
||||
string(5) "en-us"
|
||||
}
|
||||
array(10) {
|
||||
["From"]=>
|
||||
string(19) ""xyz" <xyz@xyz.com>"
|
||||
["To"]=>
|
||||
string(13) "<xyz@xyz.com>"
|
||||
["Subject"]=>
|
||||
string(35) "Reply Is? white side-LED =? in Help"
|
||||
["Date"]=>
|
||||
string(16) "Sat, 22 Dec 2012"
|
||||
["Message-ID"]=>
|
||||
string(32) "<006f01cde00e$d9f79da0$8de6d8e0>"
|
||||
["MIME-Version"]=>
|
||||
string(3) "1.0"
|
||||
["Content-Type"]=>
|
||||
string(75) "multipart/alternative; boundary="----=_NextPart_000_0070_01CDE03C.F3AFD9A0""
|
||||
["X-Mailer"]=>
|
||||
string(29) "Microsoft Office Outlook 12.0"
|
||||
["Thread-Index"]=>
|
||||
string(32) "Ac3gDtcH2huHjzYcQVmFJPPoWjJogA=="
|
||||
["Content-Language"]=>
|
||||
string(5) "en-us"
|
||||
}
|
||||
===DONE===
|
||||
@@ -1,21 +0,0 @@
|
||||
--TEST--
|
||||
Bug #66828 (iconv_mime_encode Q-encoding longer than it should be)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('iconv')) die('skip iconv extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$preferences = array(
|
||||
"input-charset" => "ISO-8859-1",
|
||||
"output-charset" => "UTF-8",
|
||||
"line-length" => 76,
|
||||
"line-break-chars" => "\n",
|
||||
"scheme" => "Q"
|
||||
);
|
||||
var_dump(iconv_mime_encode("Subject", "Test Test Test Test Test Test Test Test", $preferences));
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
string(74) "Subject: =?UTF-8?Q?Test=20Test=20Test=20Test=20Test=20Test=20Test=20Test?="
|
||||
===DONE===
|
||||
@@ -1,16 +0,0 @@
|
||||
--TEST--
|
||||
Bug #68180 (iconv_mime_decode can return extra characters in a header)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('iconv')) die('skip iconv extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$original = "=?UTF-8?Q?=E3=80=8E=E3=80=90=E5=A4=96=E8=B3=87=E7=B3=BB=E6=88=A6=E7=95=A5=E3=82=B3=E3=83=B3=E3=82=B5=E3=83=AB=E3=81=8C=E9=9B=86=E7=B5=90=E3=80=91=E3=83=88=E3=83=83=E3=83=97=E3=82=B3=E3=83=B3=E3=82=B5=E3=83=AB=E3=82=BF=E3=83=B3=E3=83=88=E3=81=A8=E8=A9=B1=E3=81=9B=E3=82=8B=E3=82=B3=E3=83=B3=E3=82=B5=E3=83=AB=E6=A5=AD=E7=95=8C=E7=A0=94=E7=A9=B6=E3=82=BB=E3=83=9F=E3=83=8A=E3=83=BC=E3=80=8F=E3=81=B8=E3=81=AE=E3=82=A8=E3=83=B3=E3=83=88=E3=83=AA=E3=83=BC=E3=81=82=E3=82=8A=E3=81=8C=E3=81=A8=E3=81=86=E3=81=94=E3=81=96=E3=81=84=E3=81=BE=E3=81=97=E3=81=9F=E3=80=82?=";
|
||||
$decoded = iconv_mime_decode($original, ICONV_MIME_DECODE_STRICT, 'utf-8');
|
||||
var_dump($decoded);
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
string(183) "『【外資系戦略コンサルが集結】トップコンサルタントと話せるコンサル業界研究セミナー』へのエントリーありがとうございました。"
|
||||
===DONE===
|
||||
@@ -1,20 +0,0 @@
|
||||
--TEST--
|
||||
Bug #76249 (stream filter convert.iconv leads to infinite loop on invalid sequence)
|
||||
--SKIPIF--
|
||||
<?php extension_loaded('iconv') or die('skip iconv extension is not available'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$fh = fopen('php://memory', 'rw');
|
||||
fwrite($fh, "abc");
|
||||
rewind($fh);
|
||||
if (false === @stream_filter_append($fh, 'convert.iconv.ucs-2/utf8//IGNORE', STREAM_FILTER_READ, [])) {
|
||||
stream_filter_append($fh, 'convert.iconv.ucs-2/utf-8//IGNORE', STREAM_FILTER_READ, []);
|
||||
}
|
||||
$a = stream_get_contents($fh);
|
||||
var_dump(strlen($a));
|
||||
?>
|
||||
DONE
|
||||
--EXPECTF--
|
||||
Warning: stream_get_contents(): iconv stream filter ("ucs-2"=>"utf%A8//IGNORE"): invalid multibyte sequence in %sbug76249.php on line %d
|
||||
int(3)
|
||||
DONE
|
||||
@@ -1082,7 +1082,6 @@ PHP_RSHUTDOWN_FUNCTION(imap)
|
||||
}
|
||||
}
|
||||
mail_free_errorlist(&IMAPG(imap_errorstack));
|
||||
IMAPG(imap_errorstack) = NIL;
|
||||
}
|
||||
|
||||
if (IMAPG(imap_alertstack) != NIL) {
|
||||
|
||||
@@ -167,7 +167,7 @@ static HashTable *BreakIterator_get_debug_info(zval *object, int *is_temp)
|
||||
}
|
||||
|
||||
ZVAL_STRING(&val, const_cast<char*>(typeid(*biter).name()));
|
||||
zend_hash_str_update(debug_info, "type", sizeof("type") - 1, &val);
|
||||
zend_hash_str_update(debug_info, "type", sizeof("type") - 1, &bio->text);
|
||||
|
||||
return debug_info;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ static void _breakiter_factory(const char *func_name,
|
||||
UErrorCode status = UErrorCode();
|
||||
intl_error_reset(NULL);
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s!",
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s!",
|
||||
&locale_str, &dummy) == FAILURE) {
|
||||
spprintf(&msg, 0, "%s: bad arguments", func_name);
|
||||
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, msg, 1);
|
||||
|
||||
@@ -79,7 +79,6 @@ static void _php_intlrbbi_constructor_body(INTERNAL_FUNCTION_PARAMETERS)
|
||||
if (U_FAILURE(status)) {
|
||||
intl_error_set(NULL, status, "rbbi_create_instance: unable to "
|
||||
"create instance from compiled rules", 0);
|
||||
delete rbbi;
|
||||
return;
|
||||
}
|
||||
#else
|
||||
|
||||
+12
-21
@@ -9,7 +9,6 @@ if test "$PHP_INTL" != "no"; then
|
||||
PHP_SETUP_ICU(INTL_SHARED_LIBADD)
|
||||
PHP_SUBST(INTL_SHARED_LIBADD)
|
||||
PHP_REQUIRE_CXX()
|
||||
INTL_COMMON_FLAGS="$ICU_INCS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
|
||||
if test "$icu_version" -ge "4002"; then
|
||||
icu_spoof_src=" spoofchecker/spoofchecker_class.c \
|
||||
spoofchecker/spoofchecker.c\
|
||||
@@ -21,6 +20,7 @@ if test "$PHP_INTL" != "no"; then
|
||||
PHP_NEW_EXTENSION(intl, php_intl.c \
|
||||
intl_error.c \
|
||||
intl_convert.c \
|
||||
intl_convertcpp.cpp \
|
||||
collator/collator.c \
|
||||
collator/collator_class.c \
|
||||
collator/collator_sort.c \
|
||||
@@ -32,6 +32,8 @@ if test "$PHP_INTL" != "no"; then
|
||||
collator/collator_is_numeric.c \
|
||||
collator/collator_error.c \
|
||||
common/common_error.c \
|
||||
common/common_enum.cpp \
|
||||
common/common_date.cpp \
|
||||
converter/converter.c \
|
||||
formatter/formatter.c \
|
||||
formatter/formatter_main.c \
|
||||
@@ -51,12 +53,17 @@ if test "$PHP_INTL" != "no"; then
|
||||
dateformat/dateformat_attr.c \
|
||||
dateformat/dateformat_data.c \
|
||||
dateformat/dateformat_format.c \
|
||||
dateformat/dateformat_format_object.cpp \
|
||||
dateformat/dateformat_parse.c \
|
||||
dateformat/dateformat_create.cpp \
|
||||
dateformat/dateformat_attrcpp.cpp \
|
||||
dateformat/dateformat_helpers.cpp \
|
||||
msgformat/msgformat.c \
|
||||
msgformat/msgformat_attr.c \
|
||||
msgformat/msgformat_class.c \
|
||||
msgformat/msgformat_data.c \
|
||||
msgformat/msgformat_format.c \
|
||||
msgformat/msgformat_helpers.cpp \
|
||||
msgformat/msgformat_parse.c \
|
||||
grapheme/grapheme_string.c \
|
||||
grapheme/grapheme_util.c \
|
||||
@@ -66,18 +73,6 @@ if test "$PHP_INTL" != "no"; then
|
||||
transliterator/transliterator.c \
|
||||
transliterator/transliterator_class.c \
|
||||
transliterator/transliterator_methods.c \
|
||||
uchar/uchar.c \
|
||||
idn/idn.c \
|
||||
$icu_spoof_src, $ext_shared,,$INTL_COMMON_FLAGS,cxx)
|
||||
|
||||
PHP_INTL_CXX_SOURCES="intl_convertcpp.cpp \
|
||||
common/common_enum.cpp \
|
||||
common/common_date.cpp \
|
||||
dateformat/dateformat_format_object.cpp \
|
||||
dateformat/dateformat_create.cpp \
|
||||
dateformat/dateformat_attrcpp.cpp \
|
||||
dateformat/dateformat_helpers.cpp \
|
||||
msgformat/msgformat_helpers.cpp \
|
||||
timezone/timezone_class.cpp \
|
||||
timezone/timezone_methods.cpp \
|
||||
calendar/calendar_class.cpp \
|
||||
@@ -88,14 +83,10 @@ if test "$PHP_INTL" != "no"; then
|
||||
breakiterator/breakiterator_methods.cpp \
|
||||
breakiterator/rulebasedbreakiterator_methods.cpp \
|
||||
breakiterator/codepointiterator_internal.cpp \
|
||||
breakiterator/codepointiterator_methods.cpp"
|
||||
PHP_INTL_CXX_FLAGS="$INTL_COMMON_FLAGS $ICU_CXXFLAGS"
|
||||
if test "$ext_shared" = "no"; then
|
||||
PHP_ADD_SOURCES(PHP_EXT_DIR(intl), $PHP_INTL_CXX_SOURCES, $PHP_INTL_CXX_FLAGS)
|
||||
else
|
||||
PHP_ADD_SOURCES_X(PHP_EXT_DIR(intl), $PHP_INTL_CXX_SOURCES, $PHP_INTL_CXX_FLAGS, shared_objects_intl, yes)
|
||||
fi
|
||||
|
||||
breakiterator/codepointiterator_methods.cpp \
|
||||
uchar/uchar.c \
|
||||
idn/idn.c \
|
||||
$icu_spoof_src, $ext_shared,,$ICU_INCS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1,cxx)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/collator)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/converter)
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/common)
|
||||
|
||||
+1
-1
@@ -130,7 +130,7 @@ if (PHP_INTL != "no") {
|
||||
ADD_FLAG("LIBS_INTL", "iculx.lib");
|
||||
}
|
||||
|
||||
ADD_FLAG("CFLAGS_INTL", "/EHsc /D U_USING_ICU_NAMESPACE=1");
|
||||
ADD_FLAG("CFLAGS_INTL", "/EHsc");
|
||||
AC_DEFINE("HAVE_INTL", 1, "Internationalization support enabled");
|
||||
} else {
|
||||
WARNING("intl not enabled; libraries and/or headers not found");
|
||||
|
||||
@@ -103,23 +103,19 @@ typedef struct _intl_data {
|
||||
RETVAL_NEW_STR(u8str); \
|
||||
}
|
||||
|
||||
#define INTL_MAX_LOCALE_LEN (ULOC_FULLNAME_CAPACITY-1)
|
||||
#define INTL_MAX_LOCALE_LEN 80
|
||||
|
||||
#define INTL_CHECK_LOCALE_LEN(locale_len) \
|
||||
if((locale_len) > INTL_MAX_LOCALE_LEN) { \
|
||||
char *_msg; \
|
||||
spprintf(&_msg, 0, "Locale string too long, should be no longer than %d characters", INTL_MAX_LOCALE_LEN); \
|
||||
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, _msg, 1); \
|
||||
efree(_msg); \
|
||||
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, \
|
||||
"Locale string too long, should be no longer than 80 characters", 0 ); \
|
||||
RETURN_NULL(); \
|
||||
}
|
||||
|
||||
#define INTL_CHECK_LOCALE_LEN_OR_FAILURE(locale_len) \
|
||||
if((locale_len) > INTL_MAX_LOCALE_LEN) { \
|
||||
char *_msg; \
|
||||
spprintf(&_msg, 0, "Locale string too long, should be no longer than %d characters", INTL_MAX_LOCALE_LEN); \
|
||||
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, _msg, 1); \
|
||||
efree(_msg); \
|
||||
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, \
|
||||
"Locale string too long, should be no longer than 80 characters", 0 ); \
|
||||
return FAILURE; \
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include <unicode/timezone.h>
|
||||
#include <unicode/datefmt.h>
|
||||
#include <unicode/calendar.h>
|
||||
#include <unicode/strenum.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
@@ -334,24 +333,6 @@ static void umsg_set_timezone(MessageFormatter_object *mfo,
|
||||
return; /* already done */
|
||||
}
|
||||
|
||||
/* There is a bug in ICU which prevents MessageFormatter::getFormats()
|
||||
to handle more than 10 formats correctly. The enumerator could be
|
||||
used to walk through the present formatters using getFormat(), which
|
||||
however seems to provide just a readonly access. This workaround
|
||||
prevents crash when there are > 10 formats but doesn't set any error.
|
||||
As a result, only DateFormatters with > 10 subformats are affected.
|
||||
This workaround should be ifdef'd out, when the bug has been fixed
|
||||
in ICU. */
|
||||
icu::StringEnumeration* fnames = mf->getFormatNames(err.code);
|
||||
if (!fnames || U_FAILURE(err.code)) {
|
||||
return;
|
||||
}
|
||||
count = fnames->count(err.code);
|
||||
delete fnames;
|
||||
if (count > 10) {
|
||||
return;
|
||||
}
|
||||
|
||||
formats = mf->getFormats(count);
|
||||
|
||||
if (formats == NULL) {
|
||||
|
||||
@@ -28,9 +28,7 @@
|
||||
*/
|
||||
PHP_METHOD(Spoofchecker, __construct)
|
||||
{
|
||||
#if U_ICU_VERSION_MAJOR_NUM < 58
|
||||
int checks;
|
||||
#endif
|
||||
zend_error_handling error_handling;
|
||||
SPOOFCHECKER_METHOD_INIT_VARS;
|
||||
|
||||
|
||||
@@ -12,29 +12,35 @@ ini_set("intl.default_locale", "ja");
|
||||
$m = array('createWordInstance', 'createLineInstance', 'createCharacterInstance',
|
||||
'createSentenceInstance', 'createTitleInstance');
|
||||
|
||||
$t = 'Frase 1... Frase 2';
|
||||
$t = 'Frase 1... Frase 2'.
|
||||
|
||||
$o1 = $o2 = null;
|
||||
foreach ($m as $method) {
|
||||
echo "===== $method =====\n";
|
||||
$o1 = IntlBreakIterator::$method('ja');
|
||||
$o2 = IntlBreakIterator::$method(NULL);
|
||||
$o3 = IntlBreakIterator::$method();
|
||||
var_dump($o1 == $o2 && $o2 == $o3);
|
||||
$o1 = call_user_func(array('IntlBreakIterator', $method), 'ja');
|
||||
var_dump($o1 == $o2);
|
||||
$o2 = call_user_func(array('IntlBreakIterator', $method), NULL);
|
||||
var_dump($o1 == $o2);
|
||||
echo "\n";
|
||||
}
|
||||
--EXPECT--
|
||||
===== createWordInstance =====
|
||||
bool(false)
|
||||
bool(true)
|
||||
|
||||
===== createLineInstance =====
|
||||
bool(false)
|
||||
bool(true)
|
||||
|
||||
===== createCharacterInstance =====
|
||||
bool(false)
|
||||
bool(true)
|
||||
|
||||
===== createSentenceInstance =====
|
||||
bool(false)
|
||||
bool(true)
|
||||
|
||||
===== createTitleInstance =====
|
||||
bool(false)
|
||||
bool(true)
|
||||
|
||||
@@ -22,22 +22,22 @@ Warning: IntlBreakIterator::createWordInstance() expects parameter 1 to be strin
|
||||
Warning: IntlBreakIterator::createWordInstance(): breakiter_create_word_instance: bad arguments in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: IntlBreakIterator::createSentenceInstance() expects at most 1 parameter, 2 given in %s on line %d
|
||||
Warning: IntlBreakIterator::createSentenceInstance() expects exactly 1 parameter, 2 given in %s on line %d
|
||||
|
||||
Warning: IntlBreakIterator::createSentenceInstance(): breakiter_create_sentence_instance: bad arguments in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: IntlBreakIterator::createCharacterInstance() expects at most 1 parameter, 2 given in %s on line %d
|
||||
Warning: IntlBreakIterator::createCharacterInstance() expects exactly 1 parameter, 2 given in %s on line %d
|
||||
|
||||
Warning: IntlBreakIterator::createCharacterInstance(): breakiter_create_character_instance: bad arguments in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: IntlBreakIterator::createTitleInstance() expects at most 1 parameter, 2 given in %s on line %d
|
||||
Warning: IntlBreakIterator::createTitleInstance() expects exactly 1 parameter, 2 given in %s on line %d
|
||||
|
||||
Warning: IntlBreakIterator::createTitleInstance(): breakiter_create_title_instance: bad arguments in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: IntlBreakIterator::createLineInstance() expects at most 1 parameter, 2 given in %s on line %d
|
||||
Warning: IntlBreakIterator::createLineInstance() expects exactly 1 parameter, 2 given in %s on line %d
|
||||
|
||||
Warning: IntlBreakIterator::createLineInstance(): breakiter_create_line_instance: bad arguments in %s on line %d
|
||||
NULL
|
||||
@@ -3,7 +3,6 @@ Bug #62070: Collator::getSortKey() returns garbage
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
|
||||
<?php if (version_compare(INTL_ICU_VERSION, '53.1') < 0) die('skip for ICU >= 53.1'); ?>
|
||||
<?php if (version_compare(INTL_ICU_VERSION, '62.1') >= 0) die('skip for ICU < 62.1'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$s1 = 'Hello';
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
--TEST--
|
||||
Bug #62070: Collator::getSortKey() returns garbage
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
|
||||
<?php if (version_compare(INTL_ICU_VERSION, '62.1') < 0) die('skip for ICU >= 62.1'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$s1 = 'Hello';
|
||||
|
||||
$coll = collator_create('en_US');
|
||||
$res = collator_get_sort_key($coll, $s1);
|
||||
|
||||
echo urlencode($res);
|
||||
--EXPECT--
|
||||
82%40%40F%01%09%01%DC%08
|
||||
@@ -1,33 +0,0 @@
|
||||
--TEST--
|
||||
Bug #74484 MessageFormatter::formatMessage memory corruption with 11+ named placeholder
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('intl'))
|
||||
die('skip intl extension not enabled');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$text = "{a} {b} {c} {d} {e} {f} {g} {h} {i} {j} {k} {l}";
|
||||
|
||||
$vars = array(
|
||||
'a' => 1,
|
||||
'b' => 2,
|
||||
'c' => 3,
|
||||
'd' => 4,
|
||||
'e' => 5,
|
||||
'f' => 6,
|
||||
'g' => 7,
|
||||
'h' => 8,
|
||||
'i' => 9,
|
||||
'j' => 10,
|
||||
'k' => 11,
|
||||
'l' => 12
|
||||
);
|
||||
|
||||
var_dump(MessageFormatter::formatMessage('en_US', $text, $vars));
|
||||
|
||||
?>
|
||||
==DONE==
|
||||
--EXPECT--
|
||||
string(26) "1 2 3 4 5 6 7 8 9 10 11 12"
|
||||
==DONE==
|
||||
Loaded 100 of 760 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user