mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-13 20:20:50 +00:00
Compare commits
38
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d8d4353d0 | ||
|
|
f3679f1909 | ||
|
|
9d07af2a69 | ||
|
|
cb276ceedc | ||
|
|
1186b81514 | ||
|
|
f48abfa902 | ||
|
|
843e492c68 | ||
|
|
ec3d864784 | ||
|
|
6b9ccda936 | ||
|
|
1195de87ff | ||
|
|
ee50fcfa27 | ||
|
|
24e595bf26 | ||
|
|
e995b7e475 | ||
|
|
6d1dd8b0af | ||
|
|
7b248a1b32 | ||
|
|
4d69587035 | ||
|
|
c8dea7ae1e | ||
|
|
abefb6dfe7 | ||
|
|
d11fceab15 | ||
|
|
29e673f8ed | ||
|
|
6d0391b1a4 | ||
|
|
a680d701ce | ||
|
|
3752d18ffe | ||
|
|
b05ff14a9a | ||
|
|
db63367871 | ||
|
|
73d6456d7d | ||
|
|
da2f581833 | ||
|
|
418f97443a | ||
|
|
9a01fe712a | ||
|
|
eedc060c92 | ||
|
|
9641586efa | ||
|
|
7670590efd | ||
|
|
7910c1dee9 | ||
|
|
d7a10f0e32 | ||
|
|
83d8ebc991 | ||
|
|
2874fa8fb0 | ||
|
|
99b1a62d55 | ||
|
|
7674b5e574 |
No files matched your search
+1
-1
@@ -24,7 +24,7 @@ environment:
|
||||
PHP_BUILD_CACHE_BASE_DIR: c:\build-cache
|
||||
PHP_BUILD_OBJ_DIR: c:\obj
|
||||
PHP_BUILD_CACHE_SDK_DIR: c:\build-cache\sdk
|
||||
PHP_BUILD_SDK_BRANCH: php-sdk-2.0.10
|
||||
PHP_BUILD_SDK_BRANCH: php-sdk-2.0.11
|
||||
# ext and env setup for tests
|
||||
#MYSQL_TEST_PASSWD: Password12!
|
||||
#MYSQL_TEST_USER: root
|
||||
|
||||
@@ -15,11 +15,8 @@ ext/dba/libflatfile/flatfile.c ident
|
||||
ext/dba/libcdb/cdb_make.c ident
|
||||
ext/dba/libcdb/cdb.c ident
|
||||
ext/filter/filter.c ident
|
||||
ext/zip/php_zip.c ident
|
||||
README.input_filter ident
|
||||
run-tests.php ident
|
||||
sapi/nsapi/nsapi.c ident
|
||||
sapi/continuity/capi.c ident
|
||||
Zend/RFCs/002.txt ident
|
||||
Zend/RFCs/003.txt ident
|
||||
ext/exif/exif.c ident
|
||||
@@ -32,7 +29,6 @@ UPGRADING.INTERNALS merge=NEWS
|
||||
/ext/bz2/tests/with_strings.phpt -crlf
|
||||
/ext/dom/tests/bug40836.phpt -crlf
|
||||
/ext/dom/tests/domelement.phpt -crlf
|
||||
/ext/ereg/tests/eregi_basic_002.phpt -crlf
|
||||
/ext/iconv/tests/iconv004.phpt -crlf
|
||||
/ext/iconv/tests/iconv_basic.phpt -crlf
|
||||
/ext/iconv/tests/iconv_strpos.phpt -crlf
|
||||
|
||||
@@ -262,9 +262,7 @@ pear/phpize
|
||||
pear/run-tests
|
||||
pear/php-config
|
||||
pear/scripts
|
||||
sapi/apache/libphp7.module
|
||||
sapi/apache2handler/libphp7.module
|
||||
sapi/apache_hooks/libphp7.module
|
||||
sapi/cgi/php-cgi
|
||||
sapi/cgi/php-cgi.1
|
||||
sapi/cli/php.1
|
||||
|
||||
+4
-4
@@ -5,7 +5,7 @@ INSTALL_DATA = $(INSTALL) -m 644
|
||||
DEFS = -DPHP_ATOM_INC -I$(top_builddir)/include -I$(top_builddir)/main -I$(top_srcdir)
|
||||
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(PHP_FRAMEWORKPATH)
|
||||
|
||||
all: $(all_targets)
|
||||
all: $(all_targets)
|
||||
@echo
|
||||
@echo "Build complete."
|
||||
@echo "Don't forget to run 'make test'."
|
||||
@@ -112,13 +112,13 @@ test: all
|
||||
clean:
|
||||
find . -name \*.gcno -o -name \*.gcda | xargs rm -f
|
||||
find . -name \*.lo -o -name \*.o | xargs rm -f
|
||||
find . -name \*.la -o -name \*.a | xargs rm -f
|
||||
find . -name \*.la -o -name \*.a | xargs rm -f
|
||||
find . -name \*.so | xargs rm -f
|
||||
find . -name .libs -a -type d|xargs rm -rf
|
||||
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_MILTER_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
|
||||
|
||||
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 sapi/apache/libphp$(PHP_MAJOR_VERSION).module sapi/apache_hooks/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak Zend/zend_config.h TSRM/tsrm_config.h
|
||||
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 ext/phar/phar.1 ext/phar/phar.phar.1
|
||||
@@ -135,7 +135,7 @@ prof-gen:
|
||||
|
||||
prof-clean:
|
||||
find . -name \*.lo -o -name \*.o | xargs rm -f
|
||||
find . -name \*.la -o -name \*.a | xargs rm -f
|
||||
find . -name \*.la -o -name \*.a | xargs rm -f
|
||||
find . -name \*.so | xargs rm -f
|
||||
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_MILTER_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
|
||||
|
||||
|
||||
@@ -1,8 +1,46 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? 2017 PHP 7.0.25
|
||||
26 Oct 2017 PHP 7.0.25
|
||||
|
||||
- Core:
|
||||
. Fixed bug #75241 (Null pointer dereference in zend_mm_alloc_small()).
|
||||
(Laruence)
|
||||
. Fixed bug #75236 (infinite loop when printing an error-message). (Andrea)
|
||||
. Fixed bug #75252 (Incorrect token formatting on two parse errors in one
|
||||
request). (Nikita)
|
||||
. Fixed bug #75220 (Segfault when calling is_callable on parent).
|
||||
(andrewnester)
|
||||
. Fixed bug #75290 (debug info of Closures of internal functions contain
|
||||
garbage argument names). (Andrea)
|
||||
|
||||
- Apache2Handler:
|
||||
. Fixed bug #75311 (error: 'zend_hash_key' has no member named 'arKey' in
|
||||
apache2handler). (mcarbonneaux)
|
||||
|
||||
- Date:
|
||||
. Fixed bug #75055 (Out-Of-Bounds Read in timelib_meridian()). (Derick)
|
||||
|
||||
- Intl:
|
||||
. Fixed bug #75318 (The parameter of UConverter::getAliases() is not
|
||||
optional). (cmb)
|
||||
|
||||
- mcrypt:
|
||||
. Fixed bug #72535 (arcfour encryption stream filter crashes php). (Leigh)
|
||||
|
||||
- OCI8:
|
||||
. Fixed incorrect reference counting. (Dmitry, Tianfang Yang)
|
||||
|
||||
- PCRE:
|
||||
. Fixed bug #75207 (applied upstream patch for CVE-2016-1283). (Anatol)
|
||||
|
||||
- litespeed:
|
||||
. Fixed bug #75248 (Binary directory doesn't get created when building
|
||||
only litespeed SAPI). (petk)
|
||||
. Fixed bug #75251 (Missing program prefix and suffix). (petk)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #73629 (SplDoublyLinkedList::setIteratorMode masks intern flags).
|
||||
(J. Jeising, cmb)
|
||||
|
||||
28 Sep 2017 PHP 7.0.24
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
--TEST--
|
||||
Bug #75241 (Null pointer dereference in zend_mm_alloc_small())
|
||||
--FILE--
|
||||
<?php
|
||||
function eh(){}
|
||||
|
||||
set_error_handler('eh');
|
||||
|
||||
$d->d = &$d + $d->d/=0;
|
||||
var_dump($d);
|
||||
?>
|
||||
--EXPECT--
|
||||
float(INF)
|
||||
@@ -0,0 +1,28 @@
|
||||
--TEST--
|
||||
Bug #75252: Incorrect token formatting on two parse errors in one request
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$code = <<<'CODE'
|
||||
function test_missing_semicolon() : string {
|
||||
$x = []
|
||||
FOO
|
||||
}
|
||||
CODE;
|
||||
|
||||
try {
|
||||
eval($code);
|
||||
} catch (ParseError $e) {
|
||||
var_dump($e->getMessage());
|
||||
}
|
||||
|
||||
try {
|
||||
eval($code);
|
||||
} catch (ParseError $e) {
|
||||
var_dump($e->getMessage());
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
string(41) "syntax error, unexpected 'FOO' (T_STRING)"
|
||||
string(41) "syntax error, unexpected 'FOO' (T_STRING)"
|
||||
@@ -0,0 +1,26 @@
|
||||
--TEST--
|
||||
Bug #75290 (debug info of Closures of internal functions contain garbage argument names)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
var_dump((new ReflectionFunction('sin'))->getClosure());
|
||||
|
||||
var_dump(function ($someThing) {});
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
object(Closure)#2 (1) {
|
||||
["parameter"]=>
|
||||
array(1) {
|
||||
["$number"]=>
|
||||
string(10) "<required>"
|
||||
}
|
||||
}
|
||||
object(Closure)#2 (1) {
|
||||
["parameter"]=>
|
||||
array(1) {
|
||||
["$someThing"]=>
|
||||
string(10) "<required>"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -896,6 +896,8 @@ void zend_set_utility_values(zend_utility_values *utility_values) /* {{{ */
|
||||
/* this should be compatible with the standard zenderror */
|
||||
ZEND_COLD void zenderror(const char *error) /* {{{ */
|
||||
{
|
||||
CG(parse_error) = 0;
|
||||
|
||||
if (EG(exception)) {
|
||||
/* An exception was thrown in the lexer, don't throw another in the parser. */
|
||||
return;
|
||||
|
||||
+6
-3
@@ -3067,7 +3067,8 @@ get_function_via_handler:
|
||||
(!fcc->function_handler->common.scope ||
|
||||
!instanceof_function(ce_org, fcc->function_handler->common.scope))) {
|
||||
if (fcc->function_handler->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) {
|
||||
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION) {
|
||||
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION &&
|
||||
fcc->function_handler->common.function_name) {
|
||||
zend_string_release(fcc->function_handler->common.function_name);
|
||||
}
|
||||
zend_free_trampoline(fcc->function_handler);
|
||||
@@ -3237,7 +3238,8 @@ again:
|
||||
((fcc->function_handler->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) ||
|
||||
fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY ||
|
||||
fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION)) {
|
||||
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION) {
|
||||
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION &&
|
||||
fcc->function_handler->common.function_name) {
|
||||
zend_string_release(fcc->function_handler->common.function_name);
|
||||
}
|
||||
zend_free_trampoline(fcc->function_handler);
|
||||
@@ -3324,7 +3326,8 @@ again:
|
||||
((fcc->function_handler->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) ||
|
||||
fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY ||
|
||||
fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION)) {
|
||||
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION) {
|
||||
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION &&
|
||||
fcc->function_handler->common.function_name) {
|
||||
zend_string_release(fcc->function_handler->common.function_name);
|
||||
}
|
||||
zend_free_trampoline(fcc->function_handler);
|
||||
|
||||
+10
-3
@@ -414,6 +414,7 @@ static HashTable *zend_closure_get_debug_info(zval *object, int *is_temp) /* {{{
|
||||
zval val;
|
||||
struct _zend_arg_info *arg_info = closure->func.common.arg_info;
|
||||
HashTable *debug_info;
|
||||
zend_bool zstr_args = (closure->func.type == ZEND_USER_FUNCTION) || (closure->func.common.fn_flags & ZEND_ACC_USER_ARG_INFO);
|
||||
|
||||
*is_temp = 1;
|
||||
|
||||
@@ -446,9 +447,15 @@ static HashTable *zend_closure_get_debug_info(zval *object, int *is_temp) /* {{{
|
||||
zend_string *name;
|
||||
zval info;
|
||||
if (arg_info->name) {
|
||||
name = zend_strpprintf(0, "%s$%s",
|
||||
arg_info->pass_by_reference ? "&" : "",
|
||||
ZSTR_VAL(arg_info->name));
|
||||
if (zstr_args) {
|
||||
name = zend_strpprintf(0, "%s$%s",
|
||||
arg_info->pass_by_reference ? "&" : "",
|
||||
ZSTR_VAL(arg_info->name));
|
||||
} else {
|
||||
name = zend_strpprintf(0, "%s$%s",
|
||||
arg_info->pass_by_reference ? "&" : "",
|
||||
((zend_internal_arg_info*)arg_info)->name);
|
||||
}
|
||||
} else {
|
||||
name = zend_strpprintf(0, "%s$param%d",
|
||||
arg_info->pass_by_reference ? "&" : "",
|
||||
|
||||
@@ -221,8 +221,10 @@ try_again:
|
||||
if (Z_TYPE(holder) == IS_LONG) { \
|
||||
if (op == result) { \
|
||||
zval_ptr_dtor(op); \
|
||||
ZVAL_LONG(op, Z_LVAL(holder)); \
|
||||
} else { \
|
||||
(op) = &(holder); \
|
||||
} \
|
||||
(op) = &(holder); \
|
||||
} \
|
||||
break; \
|
||||
} \
|
||||
|
||||
@@ -219,8 +219,10 @@ ZEND_API void ZEND_FASTCALL _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC)
|
||||
{
|
||||
if (EXPECTED(Z_TYPE_P(zvalue) == IS_ARRAY)) {
|
||||
ZVAL_ARR(zvalue, zend_array_dup(Z_ARRVAL_P(zvalue)));
|
||||
} else if (EXPECTED(Z_TYPE_P(zvalue) == IS_STRING) ||
|
||||
EXPECTED(Z_TYPE_P(zvalue) == IS_CONSTANT)) {
|
||||
} else if (EXPECTED(Z_TYPE_P(zvalue) == IS_STRING)) {
|
||||
CHECK_ZVAL_STRING_REL(Z_STR_P(zvalue));
|
||||
ZVAL_NEW_STR(zvalue, zend_string_dup(Z_STR_P(zvalue), 0));
|
||||
} else if (EXPECTED(Z_TYPE_P(zvalue) == IS_CONSTANT)) {
|
||||
CHECK_ZVAL_STRING_REL(Z_STR_P(zvalue));
|
||||
Z_STR_P(zvalue) = zend_string_dup(Z_STR_P(zvalue), 0);
|
||||
} else if (EXPECTED(Z_TYPE_P(zvalue) == IS_CONSTANT_AST)) {
|
||||
|
||||
+15
-15
@@ -2692,21 +2692,21 @@ EOF
|
||||
else
|
||||
CONFIGURE_COMMAND="$CONFIGURE_COMMAND [$]0"
|
||||
fi
|
||||
|
||||
for arg in $clean_configure_args; do
|
||||
if test `expr -- $arg : "'.*"` = 0; then
|
||||
if test `expr -- $arg : "-.*"` = 0 && test `expr -- $arg : ".*=.*"` = 0; then
|
||||
continue;
|
||||
fi
|
||||
echo "'[$]arg' \\" >> $1
|
||||
CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS '[$]arg'"
|
||||
else
|
||||
if test `expr -- $arg : "'-.*"` = 0 && test `expr -- $arg : "'.*=.*"` = 0; then
|
||||
continue;
|
||||
fi
|
||||
echo "[$]arg \\" >> $1
|
||||
CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS [$]arg"
|
||||
fi
|
||||
CONFIGURE_ARGS="$clean_configure_args"
|
||||
while test "X$CONFIGURE_ARGS" != "X";
|
||||
do
|
||||
if CURRENT_ARG=`expr "X$CONFIGURE_ARGS" : "X *\('[[^']]*'\)"`
|
||||
then
|
||||
CONFIGURE_ARGS=`expr "X$CONFIGURE_ARGS" : "X *'[[^']]*' \(.*\)"`
|
||||
elif CURRENT_ARG=`expr "X$CONFIGURE_ARGS" : "X *\([[^ ]]*\)"`
|
||||
then
|
||||
CONFIGURE_ARGS=`expr "X$CONFIGURE_ARGS" : "X *[[^ ]]* \(.*\)"`
|
||||
CURRENT_ARG="'$CURRENT_ARG'"
|
||||
else
|
||||
break
|
||||
fi
|
||||
$as_echo "$CURRENT_ARG \\" >>$1
|
||||
CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS $CURRENT_ARG"
|
||||
done
|
||||
echo '"[$]@"' >> $1
|
||||
chmod +x $1
|
||||
|
||||
+1
-1
@@ -120,7 +120,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
PHP_MAJOR_VERSION=7
|
||||
PHP_MINOR_VERSION=0
|
||||
PHP_RELEASE_VERSION=25
|
||||
PHP_EXTRA_VERSION="-dev"
|
||||
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`
|
||||
|
||||
|
||||
+2424
-837
File diff suppressed because it is too large.
Load diff
@@ -917,8 +917,8 @@ isoweek = year4 "-"? "W" weekofyear;
|
||||
exif = year4 ":" monthlz ":" daylz " " hour24lz ":" minutelz ":" secondlz;
|
||||
firstdayof = 'first day of';
|
||||
lastdayof = 'last day of';
|
||||
backof = 'back of ' hour24 space? meridian?;
|
||||
frontof = 'front of ' hour24 space? meridian?;
|
||||
backof = 'back of ' hour24 (space? meridian)?;
|
||||
frontof = 'front of ' hour24 (space? meridian)?;
|
||||
|
||||
/* Common Log Format: 10/Oct/2000:13:55:36 -0700 */
|
||||
clf = day "/" monthabbr "/" year4 ":" hour24lz ":" minutelz ":" secondlz space tzcorrection;
|
||||
|
||||
+36
-1
@@ -647,6 +647,7 @@ static HashTable *date_object_get_gc_timezone(zval *object, zval **table, int *n
|
||||
|
||||
zval *date_interval_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv);
|
||||
void date_interval_write_property(zval *object, zval *member, zval *value, void **cache_slot);
|
||||
static zval *date_interval_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot);
|
||||
static zval *date_period_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv);
|
||||
static void date_period_write_property(zval *object, zval *member, zval *value, void **cache_slot);
|
||||
|
||||
@@ -2117,7 +2118,7 @@ static void date_register_classes(void) /* {{{ */
|
||||
date_object_handlers_interval.read_property = date_interval_read_property;
|
||||
date_object_handlers_interval.write_property = date_interval_write_property;
|
||||
date_object_handlers_interval.get_properties = date_object_get_properties_interval;
|
||||
date_object_handlers_interval.get_property_ptr_ptr = NULL;
|
||||
date_object_handlers_interval.get_property_ptr_ptr = date_interval_get_property_ptr_ptr;
|
||||
date_object_handlers_interval.get_gc = date_object_get_gc_interval;
|
||||
|
||||
INIT_CLASS_ENTRY(ce_period, "DatePeriod", date_funcs_period);
|
||||
@@ -4142,6 +4143,40 @@ void date_interval_write_property(zval *object, zval *member, zval *value, void
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ date_interval_get_property_ptr_ptr */
|
||||
static zval *date_interval_get_property_ptr_ptr(zval *object, zval *member, int type, void **cache_slot)
|
||||
{
|
||||
zval tmp_member, *ret;
|
||||
|
||||
if (Z_TYPE_P(member) != IS_STRING) {
|
||||
tmp_member = *member;
|
||||
zval_copy_ctor(&tmp_member);
|
||||
convert_to_string(&tmp_member);
|
||||
member = &tmp_member;
|
||||
cache_slot = NULL;
|
||||
}
|
||||
|
||||
if(zend_binary_strcmp("y", sizeof("y") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 ||
|
||||
zend_binary_strcmp("m", sizeof("m") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 ||
|
||||
zend_binary_strcmp("d", sizeof("d") - 1, Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0 ||
|
||||
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("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. */
|
||||
ret = NULL;
|
||||
} else {
|
||||
ret = (zend_get_std_object_handlers())->get_property_ptr_ptr(object, member, type, cache_slot);
|
||||
}
|
||||
|
||||
if (member == &tmp_member) {
|
||||
zval_dtor(member);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto DateInterval::__construct([string interval_spec])
|
||||
Creates new DateInterval object.
|
||||
|
||||
@@ -40,7 +40,7 @@ object(DateInterval)#%d (15) {
|
||||
["special_amount"]=>
|
||||
int(-1)
|
||||
["have_weekday_relative"]=>
|
||||
int(9)
|
||||
int(0)
|
||||
["have_special_relative"]=>
|
||||
int(0)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Test DateInterval props with dimension handling
|
||||
--FILE--
|
||||
<?php
|
||||
class Z extends DateInterval{}
|
||||
$z = new Z('P2Y4DT6H8M');
|
||||
$i = 0;
|
||||
$z->prop[1]=10;
|
||||
while ($i < 1026) {
|
||||
$z->prop[$i] = $i;
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
==NOCRASH==
|
||||
--EXPECT--
|
||||
==NOCRASH==
|
||||
@@ -897,7 +897,7 @@ static PHP_METHOD(UConverter, getAvailable) {
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto array UConverter::getAliases(string name) */
|
||||
ZEND_BEGIN_ARG_INFO_EX(php_converter_getaliases_arginfo, 0, ZEND_RETURN_VALUE, 0)
|
||||
ZEND_BEGIN_ARG_INFO_EX(php_converter_getaliases_arginfo, 0, ZEND_RETURN_VALUE, 1)
|
||||
ZEND_ARG_INFO(0, name)
|
||||
ZEND_END_ARG_INFO();
|
||||
static PHP_METHOD(UConverter, getAliases) {
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
Bug #75318 (The parameter of UConverter::getAliases() is not optional)
|
||||
--SKIP--
|
||||
<?php
|
||||
if (!extension_loaded('intl')) die('skip intl extension is not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$rm = new ReflectionMethod('UConverter', 'getAliases');
|
||||
var_dump($rm->getNumberOfRequiredParameters());
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
int(1)
|
||||
===DONE===
|
||||
@@ -89,7 +89,7 @@ static php_stream_filter_status_t php_mcrypt_filter(
|
||||
php_stream_bucket_delref(bucket);
|
||||
} else {
|
||||
/* Stream cipher */
|
||||
php_stream_bucket_make_writeable(bucket);
|
||||
bucket = php_stream_bucket_make_writeable(bucket);
|
||||
if (data->encrypt) {
|
||||
mcrypt_generic(data->module, bucket->buf, (int)bucket->buflen);
|
||||
} else {
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
--TEST--
|
||||
Bug #72535 arcfour encryption stream filter crashes php
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("mcrypt")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$passphrase = 'My secret';
|
||||
$plaintext = 'Secret secret secret data';
|
||||
|
||||
$iv = substr(md5('iv' . $passphrase, true), 0, 8);
|
||||
$key = substr(md5('pass1' . $passphrase, true) .
|
||||
md5('pass2' . $passphrase, true), 0, 24);
|
||||
$opts = array('iv' => $iv, 'key' => $key, 'mode' => 'stream');
|
||||
|
||||
$expected = substr($plaintext . $plaintext, 0, 48);
|
||||
|
||||
$fp = fopen('php://memory', 'wb+');
|
||||
stream_filter_append($fp, 'mcrypt.arcfour', STREAM_FILTER_WRITE, $opts);
|
||||
fwrite($fp, $plaintext);
|
||||
?>
|
||||
==NOCRASH==
|
||||
--EXPECT--
|
||||
==NOCRASH==
|
||||
+6
-4
@@ -1402,6 +1402,8 @@ void php_oci_define_hash_dtor(zval *data)
|
||||
define->name = NULL;
|
||||
}
|
||||
|
||||
zval_ptr_dtor(&define->val);
|
||||
|
||||
efree(define);
|
||||
}
|
||||
/* }}} */
|
||||
@@ -1414,9 +1416,9 @@ void php_oci_bind_hash_dtor(zval *data)
|
||||
{
|
||||
php_oci_bind *bind = (php_oci_bind *) Z_PTR_P(data);
|
||||
|
||||
if (!Z_ISUNDEF(bind->parameter)) {
|
||||
zval_ptr_dtor(&bind->parameter);
|
||||
ZVAL_UNDEF(&bind->parameter);
|
||||
if (!Z_ISUNDEF(bind->val)) {
|
||||
zval_ptr_dtor(&bind->val);
|
||||
ZVAL_UNDEF(&bind->val);
|
||||
}
|
||||
|
||||
if (bind->array.elements) {
|
||||
@@ -2642,7 +2644,7 @@ void php_oci_fetch_row (INTERNAL_FUNCTION_PARAMETERS, int mode, int expected_arg
|
||||
if (placeholder == NULL) {
|
||||
placeholder = return_value;
|
||||
} else {
|
||||
zval_dtor(placeholder);
|
||||
zval_ptr_dtor(placeholder);
|
||||
}
|
||||
|
||||
array_init(placeholder);
|
||||
|
||||
@@ -75,10 +75,10 @@ sb4 callback_fn(void *svchp, void *envhp, void *fo_ctx, ub4 fo_type, ub4 fo_even
|
||||
ZVAL_NULL(¶ms[0]);
|
||||
|
||||
/* Cleanup */
|
||||
zval_dtor(&retval);
|
||||
zval_dtor(¶ms[0]);
|
||||
zval_dtor(¶ms[1]);
|
||||
zval_dtor(¶ms[2]);
|
||||
zval_ptr_dtor(&retval);
|
||||
zval_ptr_dtor(¶ms[0]);
|
||||
zval_ptr_dtor(¶ms[1]);
|
||||
zval_ptr_dtor(¶ms[2]);
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ PHP_FUNCTION(oci_define_by_name)
|
||||
php_oci_define *define;
|
||||
zend_string *zvtmp;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsz/|l", &stmt, &name, &name_len, &var, &type) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsz|l", &stmt, &name, &name_len, &var, &type) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -153,7 +153,8 @@ PHP_FUNCTION(oci_define_by_name)
|
||||
define->name[name_len] = '\0';
|
||||
define->name_len = (ub4) name_len;
|
||||
define->type = (ub4) type;
|
||||
define->zval = var;
|
||||
ZEND_ASSERT(Z_ISREF_P(var));
|
||||
ZVAL_COPY(&define->val, var);
|
||||
|
||||
RETURN_TRUE;
|
||||
}
|
||||
@@ -202,7 +203,7 @@ PHP_FUNCTION(oci_bind_array_by_name)
|
||||
zval *bind_var = NULL;
|
||||
php_oci_statement *statement;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsz/l|ll", &z_statement, &name, &name_len, &bind_var, &max_array_len, &max_item_len, &type) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rszl|ll", &z_statement, &name, &name_len, &bind_var, &max_array_len, &max_item_len, &type) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1439,7 +1440,7 @@ PHP_FUNCTION(oci_fetch_all)
|
||||
|
||||
PHP_OCI_ZVAL_TO_STATEMENT(z_statement, statement);
|
||||
|
||||
zval_dtor(array);
|
||||
zval_ptr_dtor(array);
|
||||
|
||||
while (skip--) {
|
||||
if (php_oci_statement_fetch(statement, nrows)) {
|
||||
|
||||
+85
-66
@@ -364,8 +364,10 @@ int php_oci_statement_fetch(php_oci_statement *statement, ub4 nrows)
|
||||
continue;
|
||||
}
|
||||
|
||||
zval_dtor(column->define->zval);
|
||||
php_oci_column_to_zval(column, column->define->zval, 0);
|
||||
ZEND_ASSERT(Z_ISREF(column->define->val));
|
||||
zval_ptr_dtor(Z_REFVAL(column->define->val));
|
||||
ZVAL_NULL(Z_REFVAL(column->define->val));
|
||||
php_oci_column_to_zval(column, Z_REFVAL(column->define->val), 0);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -910,10 +912,12 @@ void php_oci_statement_free(php_oci_statement *statement)
|
||||
int php_oci_bind_pre_exec(zval *data, void *result)
|
||||
{
|
||||
php_oci_bind *bind = (php_oci_bind *) Z_PTR_P(data);
|
||||
zval *zv = &bind->val;
|
||||
|
||||
*(int *)result = 0;
|
||||
|
||||
if (Z_TYPE_P(bind->zval) == IS_ARRAY) {
|
||||
ZVAL_DEREF(zv);
|
||||
if (Z_TYPE_P(zv) == IS_ARRAY) {
|
||||
/* These checks are currently valid for oci_bind_by_name, not
|
||||
* oci_bind_array_by_name. Also bind->type and
|
||||
* bind->indicator are not used for oci_bind_array_by_name.
|
||||
@@ -927,7 +931,7 @@ int php_oci_bind_pre_exec(zval *data, void *result)
|
||||
case SQLT_CLOB:
|
||||
case SQLT_BLOB:
|
||||
case SQLT_RDD:
|
||||
if (Z_TYPE_P(bind->zval) != IS_OBJECT) {
|
||||
if (Z_TYPE_P(zv) != IS_OBJECT) {
|
||||
php_error_docref(NULL, E_WARNING, "Invalid variable used for bind");
|
||||
*(int *)result = 1;
|
||||
}
|
||||
@@ -943,14 +947,14 @@ int php_oci_bind_pre_exec(zval *data, void *result)
|
||||
case SQLT_LBI:
|
||||
case SQLT_BIN:
|
||||
case SQLT_LNG:
|
||||
if (Z_TYPE_P(bind->zval) == IS_RESOURCE || Z_TYPE_P(bind->zval) == IS_OBJECT) {
|
||||
if (Z_TYPE_P(zv) == IS_RESOURCE || Z_TYPE_P(zv) == IS_OBJECT) {
|
||||
php_error_docref(NULL, E_WARNING, "Invalid variable used for bind");
|
||||
*(int *)result = 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case SQLT_RSET:
|
||||
if (Z_TYPE_P(bind->zval) != IS_RESOURCE) {
|
||||
if (Z_TYPE_P(zv) != IS_RESOURCE) {
|
||||
php_error_docref(NULL, E_WARNING, "Invalid variable used for bind");
|
||||
*(int *)result = 1;
|
||||
}
|
||||
@@ -971,30 +975,34 @@ int php_oci_bind_post_exec(zval *data)
|
||||
php_oci_bind *bind = (php_oci_bind *) Z_PTR_P(data);
|
||||
php_oci_connection *connection = bind->parent_statement->connection;
|
||||
sword errstatus;
|
||||
zval *zv = &bind->val;
|
||||
|
||||
ZVAL_DEREF(zv);
|
||||
if (bind->indicator == -1) { /* NULL */
|
||||
zval *val = bind->zval;
|
||||
if (Z_TYPE_P(val) == IS_STRING) {
|
||||
*Z_STRVAL_P(val) = '\0'; /* XXX avoid warning in debug mode */
|
||||
if (Z_TYPE_P(zv) == IS_STRING) {
|
||||
*Z_STRVAL_P(zv) = '\0'; /* XXX avoid warning in debug mode */
|
||||
}
|
||||
zval_dtor(val);
|
||||
ZVAL_NULL(val);
|
||||
} else if (Z_TYPE_P(bind->zval) == IS_STRING
|
||||
&& Z_STRLEN_P(bind->zval) > 0
|
||||
&& Z_STRVAL_P(bind->zval)[ Z_STRLEN_P(bind->zval) ] != '\0') {
|
||||
zval_ptr_dtor(zv);
|
||||
ZVAL_NULL(zv);
|
||||
} else if (Z_TYPE_P(zv) == IS_STRING
|
||||
&& Z_STRLEN_P(zv) > 0
|
||||
&& Z_STRVAL_P(zv)[ Z_STRLEN_P(zv) ] != '\0') {
|
||||
/* The post- PHP 5.3 feature for "interned" strings disallows
|
||||
* their reallocation but (i) any IN binds either interned or
|
||||
* not should already be null terminated and (ii) for OUT
|
||||
* binds, php_oci_bind_out_callback() should have allocated a
|
||||
* new string that we can modify here.
|
||||
*/
|
||||
Z_STR_P(bind->zval) = zend_string_extend(Z_STR_P(bind->zval), Z_STRLEN_P(bind->zval)+1, 0);
|
||||
Z_STRVAL_P(bind->zval)[ Z_STRLEN_P(bind->zval) ] = '\0';
|
||||
} else if (Z_TYPE_P(bind->zval) == IS_ARRAY) {
|
||||
SEPARATE_STRING(zv);
|
||||
Z_STR_P(zv) = zend_string_extend(Z_STR_P(zv), Z_STRLEN_P(zv)+1, 0);
|
||||
Z_STRVAL_P(zv)[ Z_STRLEN_P(zv) ] = '\0';
|
||||
} else if (Z_TYPE_P(zv) == IS_ARRAY) {
|
||||
int i;
|
||||
zval *entry = NULL;
|
||||
HashTable *hash = HASH_OF(bind->zval);
|
||||
|
||||
HashTable *hash;
|
||||
|
||||
SEPARATE_ARRAY(zv);
|
||||
hash = HASH_OF(zv);
|
||||
zend_hash_internal_pointer_reset(hash);
|
||||
|
||||
switch (bind->array.type) {
|
||||
@@ -1003,22 +1011,22 @@ int php_oci_bind_post_exec(zval *data)
|
||||
case SQLT_LNG:
|
||||
for (i = 0; i < (int) bind->array.current_length; i++) {
|
||||
if ((i < (int) bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) {
|
||||
zval_dtor(entry);
|
||||
zval_ptr_dtor(entry);
|
||||
ZVAL_LONG(entry, ((oci_phpsized_int *)(bind->array.elements))[i]);
|
||||
zend_hash_move_forward(hash);
|
||||
} else {
|
||||
add_next_index_long(bind->zval, ((oci_phpsized_int *)(bind->array.elements))[i]);
|
||||
add_next_index_long(zv, ((oci_phpsized_int *)(bind->array.elements))[i]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SQLT_FLT:
|
||||
for (i = 0; i < (int) bind->array.current_length; i++) {
|
||||
if ((i < (int) bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) {
|
||||
zval_dtor(entry);
|
||||
zval_ptr_dtor(entry);
|
||||
ZVAL_DOUBLE(entry, ((double *)(bind->array.elements))[i]);
|
||||
zend_hash_move_forward(hash);
|
||||
} else {
|
||||
add_next_index_double(bind->zval, ((double *)(bind->array.elements))[i]);
|
||||
add_next_index_double(zv, ((double *)(bind->array.elements))[i]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1031,7 +1039,7 @@ int php_oci_bind_post_exec(zval *data)
|
||||
|
||||
if ((i < (int) bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) {
|
||||
PHP_OCI_CALL_RETURN(errstatus, OCIDateToText, (connection->err, &(((OCIDate *)(bind->array.elements))[i]), 0, 0, 0, 0, &buff_len, buff));
|
||||
zval_dtor(entry);
|
||||
zval_ptr_dtor(entry);
|
||||
|
||||
if (errstatus != OCI_SUCCESS) {
|
||||
connection->errcode = php_oci_error(connection->err, errstatus);
|
||||
@@ -1047,10 +1055,10 @@ int php_oci_bind_post_exec(zval *data)
|
||||
if (errstatus != OCI_SUCCESS) {
|
||||
connection->errcode = php_oci_error(connection->err, errstatus);
|
||||
PHP_OCI_HANDLE_ERROR(connection, connection->errcode);
|
||||
add_next_index_null(bind->zval);
|
||||
add_next_index_null(zv);
|
||||
} else {
|
||||
connection->errcode = 0; /* retain backwards compat with OCI8 1.4 */
|
||||
add_next_index_stringl(bind->zval, (char *)buff, buff_len);
|
||||
add_next_index_stringl(zv, (char *)buff, buff_len);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1066,20 +1074,21 @@ int php_oci_bind_post_exec(zval *data)
|
||||
/* int curr_element_length = strlen(((text *)bind->array.elements)+i*bind->array.max_length); */
|
||||
int curr_element_length = bind->array.element_lengths[i];
|
||||
if ((i < (int) bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) {
|
||||
zval_dtor(entry);
|
||||
zval_ptr_dtor(entry);
|
||||
ZVAL_STRINGL(entry, (char *)(((text *)bind->array.elements)+i*bind->array.max_length), curr_element_length);
|
||||
zend_hash_move_forward(hash);
|
||||
} else {
|
||||
add_next_index_stringl(bind->zval, (char *)(((text *)bind->array.elements)+i*bind->array.max_length), curr_element_length);
|
||||
add_next_index_stringl(zv, (char *)(((text *)bind->array.elements)+i*bind->array.max_length), curr_element_length);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else if ((Z_TYPE_P(bind->zval) == IS_TRUE) || (Z_TYPE_P(bind->zval) == IS_FALSE)) {
|
||||
if (Z_LVAL_P(bind->zval) == 0)
|
||||
ZVAL_BOOL(bind->zval, FALSE);
|
||||
else if (Z_LVAL_P(bind->zval) == 1)
|
||||
ZVAL_BOOL(bind->zval, TRUE);
|
||||
} else if ((Z_TYPE_P(zv) == IS_TRUE) || (Z_TYPE_P(zv) == IS_FALSE)) {
|
||||
/* This convetrsion is done on purpose (ext/oci8 uses LVAL as a temorary value) */
|
||||
if (Z_LVAL_P(zv) == 0)
|
||||
ZVAL_BOOL(zv, FALSE);
|
||||
else if (Z_LVAL_P(zv) == 1)
|
||||
ZVAL_BOOL(zv, TRUE);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -1103,11 +1112,8 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, size_t name_l
|
||||
sword errstatus;
|
||||
zval *param = NULL;
|
||||
|
||||
if (!Z_ISREF_P(var)) {
|
||||
param = var;
|
||||
} else {
|
||||
param = Z_REFVAL_P(var);
|
||||
}
|
||||
ZEND_ASSERT(Z_ISREF_P(var));
|
||||
param = Z_REFVAL_P(var);
|
||||
|
||||
switch (type) {
|
||||
case SQLT_NTY:
|
||||
@@ -1242,9 +1248,9 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, size_t name_l
|
||||
|
||||
if ((old_bind = zend_hash_str_find_ptr(statement->binds, name, name_len)) != NULL) {
|
||||
bindp = old_bind;
|
||||
if (!Z_ISUNDEF(bindp->parameter)) {
|
||||
zval_ptr_dtor(&bindp->parameter);
|
||||
ZVAL_UNDEF(&bindp->parameter);
|
||||
if (!Z_ISUNDEF(bindp->val)) {
|
||||
zval_ptr_dtor(&bindp->val);
|
||||
ZVAL_UNDEF(&bindp->val);
|
||||
}
|
||||
} else {
|
||||
zend_string *zvtmp;
|
||||
@@ -1254,9 +1260,6 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, size_t name_l
|
||||
zend_string_release(zvtmp);
|
||||
}
|
||||
|
||||
/* Keep a copy of bound variable in the bind hash */
|
||||
ZVAL_COPY(&bindp->parameter, var);
|
||||
|
||||
/* Make sure the minimum of value_sz is 1 to avoid ORA-3149
|
||||
* when both in/out parameters are bound with empty strings
|
||||
*/
|
||||
@@ -1266,7 +1269,7 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, size_t name_l
|
||||
bindp->descriptor = oci_desc;
|
||||
bindp->statement = oci_stmt;
|
||||
bindp->parent_statement = statement;
|
||||
bindp->zval = param;
|
||||
ZVAL_COPY(&bindp->val, var);
|
||||
bindp->type = type;
|
||||
/* Storing max length set in OCIBindByName() to check it later in
|
||||
* php_oci_bind_in_callback() function to avoid ORA-1406 error while
|
||||
@@ -1360,11 +1363,14 @@ sb4 php_oci_bind_in_callback(
|
||||
php_oci_bind *phpbind;
|
||||
zval *val;
|
||||
|
||||
if (!(phpbind=(php_oci_bind *)ictxp) || !(val = phpbind->zval)) {
|
||||
if (!(phpbind=(php_oci_bind *)ictxp) || Z_ISUNDEF(phpbind->val)) {
|
||||
php_error_docref(NULL, E_WARNING, "Invalid phpbind pointer value");
|
||||
return OCI_ERROR;
|
||||
}
|
||||
|
||||
val = &phpbind->val;
|
||||
ZVAL_DEREF(val);
|
||||
|
||||
if (Z_ISNULL_P(val)) {
|
||||
/* we're going to insert a NULL column */
|
||||
phpbind->indicator = -1;
|
||||
@@ -1421,11 +1427,14 @@ sb4 php_oci_bind_out_callback(
|
||||
zval *val;
|
||||
sb4 retval = OCI_ERROR;
|
||||
|
||||
if (!(phpbind=(php_oci_bind *)octxp) || !(val = phpbind->zval)) {
|
||||
if (!(phpbind=(php_oci_bind *)octxp) || Z_ISUNDEF(phpbind->val)) {
|
||||
php_error_docref(NULL, E_WARNING, "Invalid phpbind pointer value");
|
||||
return retval;
|
||||
}
|
||||
|
||||
val = &phpbind->val;
|
||||
ZVAL_DEREF(val);
|
||||
|
||||
if (Z_TYPE_P(val) == IS_RESOURCE) {
|
||||
/* Processing for ref-cursor out binds */
|
||||
if (phpbind->statement != NULL) {
|
||||
@@ -1463,7 +1472,7 @@ sb4 php_oci_bind_out_callback(
|
||||
retval = OCI_CONTINUE;
|
||||
} else {
|
||||
convert_to_string(val);
|
||||
zval_dtor(val);
|
||||
zval_ptr_dtor(val);
|
||||
|
||||
{
|
||||
char *p = ecalloc(1, PHP_OCI_PIECE_SIZE);
|
||||
@@ -1474,12 +1483,12 @@ sb4 php_oci_bind_out_callback(
|
||||
Z_STRLEN_P(val) = PHP_OCI_PIECE_SIZE; /* 64K-1 is max XXX */
|
||||
Z_STRVAL_P(val) = ecalloc(1, Z_STRLEN_P(val) + 1);
|
||||
/* XXX is this right? */
|
||||
ZVAL_STRINGL(val, NULL, Z_STRLEN(phpbind->zval) + 1);
|
||||
ZVAL_STRINGL(val, NULL, Z_STRLEN(val) + 1);
|
||||
#endif
|
||||
|
||||
/* XXX we assume that zend-zval len has 4 bytes */
|
||||
*alenpp = (ub4*) &Z_STRLEN_P(phpbind->zval);
|
||||
*bufpp = Z_STRVAL_P(phpbind->zval);
|
||||
*alenpp = (ub4*) &Z_STRLEN_P(val);
|
||||
*bufpp = Z_STRVAL_P(val);
|
||||
*piecep = OCI_ONE_PIECE;
|
||||
*rcodepp = &phpbind->retcode;
|
||||
*indpp = &phpbind->indicator;
|
||||
@@ -1527,10 +1536,10 @@ php_oci_out_column *php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAME
|
||||
column = php_oci_statement_get_column(statement, Z_LVAL(tmp), NULL, 0);
|
||||
if (!column) {
|
||||
php_error_docref(NULL, E_WARNING, "Invalid column index \"" ZEND_LONG_FMT "\"", Z_LVAL(tmp));
|
||||
zval_dtor(&tmp);
|
||||
zval_ptr_dtor(&tmp);
|
||||
return NULL;
|
||||
}
|
||||
zval_dtor(&tmp);
|
||||
zval_ptr_dtor(&tmp);
|
||||
}
|
||||
return column;
|
||||
}
|
||||
@@ -1586,11 +1595,15 @@ int php_oci_statement_get_numrows(php_oci_statement *statement, ub4 *numrows)
|
||||
Bind arrays to PL/SQL types */
|
||||
int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, size_t name_len, zval *var, zend_long max_table_length, zend_long maxlength, zend_long type)
|
||||
{
|
||||
php_oci_bind *bind, *bindp;
|
||||
php_oci_bind *bind;
|
||||
sword errstatus;
|
||||
zend_string *zvtmp;
|
||||
zval *val;
|
||||
|
||||
convert_to_array(var);
|
||||
ZEND_ASSERT(Z_ISREF_P(var));
|
||||
val = Z_REFVAL_P(var);
|
||||
SEPARATE_ZVAL_NOREF(val);
|
||||
convert_to_array(val);
|
||||
|
||||
if (maxlength < -1) {
|
||||
php_error_docref(NULL, E_WARNING, "Invalid max length value (" ZEND_LONG_FMT ")", maxlength);
|
||||
@@ -1601,11 +1614,11 @@ int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, size_t
|
||||
case SQLT_NUM:
|
||||
case SQLT_INT:
|
||||
case SQLT_LNG:
|
||||
bind = php_oci_bind_array_helper_number(var, max_table_length);
|
||||
bind = php_oci_bind_array_helper_number(val, max_table_length);
|
||||
break;
|
||||
|
||||
case SQLT_FLT:
|
||||
bind = php_oci_bind_array_helper_double(var, max_table_length);
|
||||
bind = php_oci_bind_array_helper_double(val, max_table_length);
|
||||
break;
|
||||
|
||||
case SQLT_AFC:
|
||||
@@ -1614,14 +1627,14 @@ int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, size_t
|
||||
case SQLT_AVC:
|
||||
case SQLT_STR:
|
||||
case SQLT_LVC:
|
||||
if (maxlength == -1 && zend_hash_num_elements(Z_ARRVAL_P(var)) == 0) {
|
||||
if (maxlength == -1 && zend_hash_num_elements(Z_ARRVAL_P(val)) == 0) {
|
||||
php_error_docref(NULL, E_WARNING, "You must provide max length value for empty arrays");
|
||||
return 1;
|
||||
}
|
||||
bind = php_oci_bind_array_helper_string(var, max_table_length, maxlength);
|
||||
bind = php_oci_bind_array_helper_string(val, max_table_length, maxlength);
|
||||
break;
|
||||
case SQLT_ODT:
|
||||
bind = php_oci_bind_array_helper_date(var, max_table_length, statement->connection);
|
||||
bind = php_oci_bind_array_helper_date(val, max_table_length, statement->connection);
|
||||
break;
|
||||
default:
|
||||
php_error_docref(NULL, E_WARNING, "Unknown or unsupported datatype given: " ZEND_LONG_FMT, type);
|
||||
@@ -1638,7 +1651,7 @@ int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, size_t
|
||||
bind->statement = NULL;
|
||||
bind->parent_statement = statement;
|
||||
bind->bind = NULL;
|
||||
bind->zval = var;
|
||||
ZVAL_COPY(&bind->val, var);
|
||||
bind->array.type = type;
|
||||
bind->indicator = 0; /* not used for array binds */
|
||||
bind->type = 0; /* not used for array binds */
|
||||
@@ -1677,6 +1690,8 @@ int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, size_t
|
||||
efree(bind->array.indicators);
|
||||
}
|
||||
|
||||
zval_ptr_dtor(&bind->val);
|
||||
|
||||
efree(bind);
|
||||
|
||||
statement->errcode = php_oci_error(statement->err, errstatus);
|
||||
@@ -1690,7 +1705,7 @@ int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, size_t
|
||||
}
|
||||
|
||||
zvtmp = zend_string_init(name, name_len, 0);
|
||||
bindp = zend_hash_update_ptr(statement->binds, zvtmp, bind);
|
||||
zend_hash_update_ptr(statement->binds, zvtmp, bind);
|
||||
zend_string_release(zvtmp);
|
||||
|
||||
statement->errcode = 0; /* retain backwards compat with OCI8 1.4 */
|
||||
@@ -1707,6 +1722,7 @@ php_oci_bind *php_oci_bind_array_helper_string(zval *var, zend_long max_table_le
|
||||
HashTable *hash;
|
||||
zval *entry;
|
||||
|
||||
SEPARATE_ARRAY(var); /* TODO: may be use new HashTable iteration and prevent inplace modification */
|
||||
hash = HASH_OF(var);
|
||||
|
||||
if (maxlength == -1) {
|
||||
@@ -1723,7 +1739,7 @@ php_oci_bind *php_oci_bind_array_helper_string(zval *var, zend_long max_table_le
|
||||
}
|
||||
|
||||
bind = emalloc(sizeof(php_oci_bind));
|
||||
ZVAL_UNDEF(&bind->parameter);
|
||||
ZVAL_UNDEF(&bind->val);
|
||||
bind->array.elements = (text *)safe_emalloc(max_table_length * (maxlength + 1), sizeof(text), 0);
|
||||
memset(bind->array.elements, 0, max_table_length * (maxlength + 1) * sizeof(text));
|
||||
bind->array.current_length = zend_hash_num_elements(Z_ARRVAL_P(var));
|
||||
@@ -1780,10 +1796,11 @@ php_oci_bind *php_oci_bind_array_helper_number(zval *var, zend_long max_table_le
|
||||
HashTable *hash;
|
||||
zval *entry;
|
||||
|
||||
SEPARATE_ARRAY(var); /* TODO: may be use new HashTable iteration and prevent inplace modification */
|
||||
hash = HASH_OF(var);
|
||||
|
||||
bind = emalloc(sizeof(php_oci_bind));
|
||||
ZVAL_UNDEF(&bind->parameter);
|
||||
ZVAL_UNDEF(&bind->val);
|
||||
bind->array.elements = (oci_phpsized_int *)safe_emalloc(max_table_length, sizeof(oci_phpsized_int), 0);
|
||||
bind->array.current_length = zend_hash_num_elements(Z_ARRVAL_P(var));
|
||||
bind->array.old_length = bind->array.current_length;
|
||||
@@ -1820,10 +1837,11 @@ php_oci_bind *php_oci_bind_array_helper_double(zval *var, zend_long max_table_le
|
||||
HashTable *hash;
|
||||
zval *entry;
|
||||
|
||||
SEPARATE_ARRAY(var); /* TODO: may be use new HashTable iteration and prevent inplace modification */
|
||||
hash = HASH_OF(var);
|
||||
|
||||
bind = emalloc(sizeof(php_oci_bind));
|
||||
ZVAL_UNDEF(&bind->parameter);
|
||||
ZVAL_UNDEF(&bind->val);
|
||||
bind->array.elements = (double *)safe_emalloc(max_table_length, sizeof(double), 0);
|
||||
bind->array.current_length = zend_hash_num_elements(Z_ARRVAL_P(var));
|
||||
bind->array.old_length = bind->array.current_length;
|
||||
@@ -1861,10 +1879,11 @@ php_oci_bind *php_oci_bind_array_helper_date(zval *var, zend_long max_table_leng
|
||||
zval *entry;
|
||||
sword errstatus;
|
||||
|
||||
SEPARATE_ARRAY(var); /* TODO: may be use new HashTable iteration and prevent inplace modification */
|
||||
hash = HASH_OF(var);
|
||||
|
||||
bind = emalloc(sizeof(php_oci_bind));
|
||||
ZVAL_UNDEF(&bind->parameter);
|
||||
ZVAL_UNDEF(&bind->val);
|
||||
bind->array.elements = (OCIDate *)safe_emalloc(max_table_length, sizeof(OCIDate), 0);
|
||||
bind->array.current_length = zend_hash_num_elements(Z_ARRVAL_P(var));
|
||||
bind->array.old_length = bind->array.current_length;
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@
|
||||
*/
|
||||
#undef PHP_OCI8_VERSION
|
||||
#endif
|
||||
#define PHP_OCI8_VERSION "2.1.7"
|
||||
#define PHP_OCI8_VERSION "2.1.8"
|
||||
|
||||
extern zend_module_entry oci8_module_entry;
|
||||
#define phpext_oci8_ptr &oci8_module_entry
|
||||
|
||||
@@ -209,7 +209,7 @@ typedef struct {
|
||||
|
||||
/* {{{ php_oci_define */
|
||||
typedef struct {
|
||||
zval *zval; /* zval used in define */
|
||||
zval val; /* zval used in define */
|
||||
text *name; /* placeholder's name */
|
||||
ub4 name_len; /* placeholder's name length */
|
||||
ub4 type; /* define type */
|
||||
@@ -244,8 +244,7 @@ typedef struct {
|
||||
/* {{{ php_oci_bind */
|
||||
typedef struct {
|
||||
OCIBind *bind; /* bind handle */
|
||||
zval *zval; /* value */
|
||||
zval parameter; /* a copy of bound variable used for oci_bind_by_name */
|
||||
zval val; /* value */
|
||||
dvoid *descriptor; /* used for binding of LOBS etc */
|
||||
OCIStmt *statement; /* used for binding REFCURSORs */
|
||||
php_oci_statement *parent_statement; /* pointer to the parent statement */
|
||||
|
||||
@@ -7272,7 +7272,12 @@ for (;; ptr++)
|
||||
so far in order to get the number. If the name is not found, leave
|
||||
the value of recno as 0 for a forward reference. */
|
||||
|
||||
else
|
||||
/* This patch (removing "else") fixes a problem when a reference is
|
||||
to multiple identically named nested groups from within the nest.
|
||||
Once again, it is not the "proper" fix, and it results in an
|
||||
over-allocation of memory. */
|
||||
|
||||
/* else */
|
||||
{
|
||||
ng = cd->named_groups;
|
||||
for (i = 0; i < cd->names_found; i++, ng++)
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--TEST--
|
||||
CVE-2016-1283, see bug #75207
|
||||
--FILE--
|
||||
<?php
|
||||
preg_match("/(?:F?+(?:^(?(R)a+\"){99}-))(?J)(?'R'(?'R'<((?'RR'(?'R'\){97)?J)?J)(?'R'(?'R'\){99|(:(?|(?'R')(\k'R')|((?'R')))H'R'R)(H'R))))))/", "*b\dc");
|
||||
?>
|
||||
==DONE==
|
||||
--EXPECTF--
|
||||
Warning: preg_match(): Compilation failed: unmatched parentheses at offset %d in %s on line %d
|
||||
==DONE==
|
||||
@@ -3,6 +3,7 @@ Bug #74950 (null pointer deref in zim_simplexml_element_getDocNamespaces)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("simplexml")) die("skip SimpleXML not available");
|
||||
if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platforms only");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -733,7 +733,7 @@ SPL_METHOD(SplDoublyLinkedList, setIteratorMode)
|
||||
return;
|
||||
}
|
||||
|
||||
intern->flags = value & SPL_DLLIST_IT_MASK;
|
||||
intern->flags = (value & SPL_DLLIST_IT_MASK) | (intern->flags & SPL_DLLIST_IT_FIX);
|
||||
|
||||
RETURN_LONG(intern->flags);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
--TEST--
|
||||
Bug #73629 (SplDoublyLinkedList::setIteratorMode masks intern flags)
|
||||
--FILE--
|
||||
<?php
|
||||
$q = new SplQueue();
|
||||
try {
|
||||
$q->setIteratorMode(SplDoublyLinkedList::IT_MODE_FIFO);
|
||||
} catch (Exception $e) {
|
||||
echo 'unexpected exception: ' . $e->getMessage() . "\n";
|
||||
}
|
||||
try {
|
||||
$q->setIteratorMode(SplDoublyLinkedList::IT_MODE_LIFO);
|
||||
} catch (Exception $e) {
|
||||
echo 'expected exception: ' . $e->getMessage() . "\n";
|
||||
}
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
expected exception: Iterators' LIFO/FIFO modes for SplStack/SplQueue objects are frozen
|
||||
===DONE===
|
||||
@@ -314,7 +314,7 @@ PHP_FUNCTION(stream_socket_get_name)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (!ZSTR_LEN(name)) {
|
||||
if ((ZSTR_LEN(name) == 0) || (ZSTR_VAL(name)[0] == 0)) {
|
||||
zend_string_release(name);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
--TEST--
|
||||
Bug #75220 (is_callable crash for 'parent')
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$a = new A();
|
||||
$a->bar('foo');
|
||||
|
||||
class B {};
|
||||
class A extends B
|
||||
{
|
||||
function bar($func)
|
||||
{
|
||||
var_dump('foo');
|
||||
var_dump(is_callable('parent::foo'));
|
||||
var_dump(is_callable(array('parent', 'foo')));
|
||||
}
|
||||
|
||||
function __call($func, $args)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
string(3) "foo"
|
||||
bool(false)
|
||||
bool(false)
|
||||
@@ -5,5 +5,5 @@ Bug #74103: heap-use-after-free when unserializing invalid array size
|
||||
var_dump(unserialize('a:7:{i:0;i:04;s:1:"a";i:2;i:00009617006;i:4;s:1:"a";i:4;s:1:"a";R:5;s:1:"7";R:3;s:1:"a";R:5;;s:18;}}'));
|
||||
?>
|
||||
--EXPECTF--
|
||||
Notice: unserialize(): Error at offset 68 of 100 bytes in %s on line %d
|
||||
Notice: unserialize(): Error at offset %d of %d bytes in %s on line %d
|
||||
bool(false)
|
||||
@@ -0,0 +1,20 @@
|
||||
--TEST--
|
||||
Bug #75055 Out-Of-Bounds Read in timelib_meridian()
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("wddx")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$file_str = dirname(__FILE__) . "/bug75055.wddx";
|
||||
|
||||
$wddx_str = file_get_contents($file_str);
|
||||
print strlen($wddx_str) . " bytes read.\n";
|
||||
|
||||
var_dump(wddx_deserialize($wddx_str));
|
||||
?>
|
||||
--EXPECT--
|
||||
323 bytes read.
|
||||
array(1) {
|
||||
["aDateTime"]=>
|
||||
string(12) "frONt of 0 0"
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version='1.0'?>
|
||||
<!DOCTYPE wddxPacket SYSTEM 'wddx_0100.dtd'>
|
||||
<wddxPacket version='1.0'>
|
||||
<header/>
|
||||
<data>
|
||||
<struct>
|
||||
<var name='aDateTime'>
|
||||
<dateTime>frONt of 0 0</dateTime>
|
||||
</var>
|
||||
</struct>
|
||||
</data>
|
||||
</wddxPacket>
|
||||
|
||||
+32
-7
@@ -92,6 +92,8 @@
|
||||
#include "SAPI.h"
|
||||
#include "rfc1867.h"
|
||||
|
||||
#include "ext/standard/html_tables.h"
|
||||
|
||||
#if HAVE_MMAP || defined(PHP_WIN32)
|
||||
# if HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
@@ -124,6 +126,31 @@ PHPAPI int core_globals_id;
|
||||
|
||||
#define SAFE_FILENAME(f) ((f)?(f):"-")
|
||||
|
||||
static char *get_safe_charset_hint(void) {
|
||||
ZEND_TLS char *lastHint = NULL;
|
||||
ZEND_TLS char *lastCodeset = NULL;
|
||||
char *hint = SG(default_charset);
|
||||
size_t len = strlen(hint);
|
||||
size_t i = 0;
|
||||
|
||||
if (lastHint == SG(default_charset)) {
|
||||
return lastCodeset;
|
||||
}
|
||||
|
||||
lastHint = hint;
|
||||
lastCodeset = NULL;
|
||||
|
||||
for (i = 0; i < sizeof(charset_map)/sizeof(charset_map[0]); i++) {
|
||||
if (len == charset_map[i].codeset_len
|
||||
&& zend_binary_strcasecmp(hint, len, charset_map[i].codeset, len) == 0) {
|
||||
lastCodeset = (char*)charset_map[i].codeset;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return lastCodeset;
|
||||
}
|
||||
|
||||
/* {{{ PHP_INI_MH
|
||||
*/
|
||||
static PHP_INI_MH(OnSetPrecision)
|
||||
@@ -722,10 +749,10 @@ PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int typ
|
||||
buffer_len = (int)vspprintf(&buffer, 0, format, args);
|
||||
|
||||
if (PG(html_errors)) {
|
||||
replace_buffer = php_escape_html_entities((unsigned char*)buffer, buffer_len, 0, ENT_COMPAT, SG(default_charset));
|
||||
replace_buffer = php_escape_html_entities((unsigned char*)buffer, buffer_len, 0, ENT_COMPAT, get_safe_charset_hint());
|
||||
/* Retry with substituting invalid chars on fail. */
|
||||
if (!replace_buffer || ZSTR_LEN(replace_buffer) < 1) {
|
||||
replace_buffer = php_escape_html_entities((unsigned char*)buffer, buffer_len, 0, ENT_COMPAT | ENT_HTML_SUBSTITUTE_ERRORS, SG(default_charset));
|
||||
replace_buffer = php_escape_html_entities((unsigned char*)buffer, buffer_len, 0, ENT_COMPAT | ENT_HTML_SUBSTITUTE_ERRORS, get_safe_charset_hint());
|
||||
}
|
||||
|
||||
efree(buffer);
|
||||
@@ -792,7 +819,7 @@ PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int typ
|
||||
}
|
||||
|
||||
if (PG(html_errors)) {
|
||||
replace_origin = php_escape_html_entities((unsigned char*)origin, origin_len, 0, ENT_COMPAT, SG(default_charset));
|
||||
replace_origin = php_escape_html_entities((unsigned char*)origin, origin_len, 0, ENT_COMPAT, get_safe_charset_hint());
|
||||
efree(origin);
|
||||
origin = ZSTR_VAL(replace_origin);
|
||||
}
|
||||
@@ -1106,7 +1133,7 @@ static ZEND_COLD void php_error_cb(int type, const char *error_filename, const u
|
||||
|
||||
if (PG(html_errors)) {
|
||||
if (type == E_ERROR || type == E_PARSE) {
|
||||
zend_string *buf = php_escape_html_entities((unsigned char*)buffer, buffer_len, 0, ENT_COMPAT, SG(default_charset));
|
||||
zend_string *buf = php_escape_html_entities((unsigned char*)buffer, buffer_len, 0, ENT_COMPAT, get_safe_charset_hint());
|
||||
php_printf("%s<br />\n<b>%s</b>: %s in <b>%s</b> on line <b>%d</b><br />\n%s", STR_PRINT(prepend_string), error_type_str, ZSTR_VAL(buf), error_filename, error_lineno, STR_PRINT(append_string));
|
||||
zend_string_free(buf);
|
||||
} else {
|
||||
@@ -1173,9 +1200,7 @@ static ZEND_COLD void php_error_cb(int type, const char *error_filename, const u
|
||||
sapi_header_op(SAPI_HEADER_REPLACE, &ctr);
|
||||
}
|
||||
/* the parser would return 1 (failure), we can bail out nicely */
|
||||
if (type == E_PARSE) {
|
||||
CG(parse_error) = 0;
|
||||
} else {
|
||||
if (type != E_PARSE) {
|
||||
/* restore memory limit */
|
||||
zend_set_memory_limit(PG(memory_limit));
|
||||
efree(buffer);
|
||||
|
||||
+2
-2
@@ -3,6 +3,6 @@
|
||||
#define PHP_MAJOR_VERSION 7
|
||||
#define PHP_MINOR_VERSION 0
|
||||
#define PHP_RELEASE_VERSION 25
|
||||
#define PHP_EXTRA_VERSION "-dev"
|
||||
#define PHP_VERSION "7.0.25-dev"
|
||||
#define PHP_EXTRA_VERSION ""
|
||||
#define PHP_VERSION "7.0.25"
|
||||
#define PHP_VERSION_ID 70025
|
||||
@@ -128,7 +128,7 @@ static zend_bool should_overwrite_per_dir_entry(HashTable *target_ht, zval *zv,
|
||||
|
||||
if (new_per_dir_entry->status >= orig_per_dir_entry->status) {
|
||||
/* use new entry */
|
||||
phpapdebug((stderr, "ADDING/OVERWRITING %s (%d vs. %d)\n", hash_key->arKey, new_per_dir_entry->status, orig_per_dir_entry->status));
|
||||
phpapdebug((stderr, "ADDING/OVERWRITING %s (%d vs. %d)\n", ZSTR_VAL(hash_key->key), new_per_dir_entry->status, orig_per_dir_entry->status));
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
@@ -176,7 +176,7 @@ void apply_config(void *dummy)
|
||||
php_dir_entry *data;
|
||||
|
||||
ZEND_HASH_FOREACH_STR_KEY_PTR(&d->config, str, data) {
|
||||
phpapdebug((stderr, "APPLYING (%s)(%s)\n", str, data->value));
|
||||
phpapdebug((stderr, "APPLYING (%s)(%s)\n", ZSTR_VAL(str), data->value));
|
||||
if (zend_alter_ini_entry_chars(str, data->value, data->value_len, data->status, data->htaccess?PHP_INI_STAGE_HTACCESS:PHP_INI_STAGE_ACTIVATE) == FAILURE) {
|
||||
phpapdebug((stderr, "..FAILED\n"));
|
||||
}
|
||||
|
||||
+3
-3
@@ -27,9 +27,9 @@ if test "$PHP_CGI" != "no"; then
|
||||
|
||||
AC_MSG_CHECKING([whether cross-process locking is required by accept()])
|
||||
case "`uname -sr`" in
|
||||
IRIX\ 5.* | SunOS\ 5.* | UNIX_System_V\ 4.0)
|
||||
IRIX\ 5.* | SunOS\ 5.* | UNIX_System_V\ 4.0)
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([USE_LOCKING], [1],
|
||||
AC_DEFINE([USE_LOCKING], [1],
|
||||
[Define if cross-process locking is required by accept()])
|
||||
;;
|
||||
*)
|
||||
@@ -74,5 +74,5 @@ if test "$PHP_CGI" != "no"; then
|
||||
|
||||
PHP_OUTPUT(sapi/cgi/php-cgi.1)
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
@@ -20,19 +20,7 @@ if (shell_exec('PowerShell -Help') === NULL)
|
||||
// Hence on Windows 8, we don't verify that the title is actually set by
|
||||
// cli_set_process_title(). We're only making the API calls to ensure there are
|
||||
// no warnings/errors.
|
||||
|
||||
$is_windows8_or_above = false;
|
||||
$ps_output = shell_exec("PowerShell -NoProfile \"(Get-Host).UI.RawUI.WindowTitle\"");
|
||||
if ($ps_output === null)
|
||||
{
|
||||
echo "Get-Host failed\n";
|
||||
die();
|
||||
}
|
||||
|
||||
$ps_output = trim($ps_output);
|
||||
$end_title_windows8 = ": Windows PowerShell";
|
||||
if (($ps_output == "Windows PowerShell") || (strlen($ps_output) > strlen($end_title_windows8) && substr($ps_output,-strlen($end_title_windows8)) === $end_title_windows8) || PHP_WINDOWS_VERSION_MAJOR >= 10)
|
||||
$is_windows8_or_above = true;
|
||||
$is_windows8_or_above = PHP_WINDOWS_VERSION_MAJOR >= 10 || PHP_WINDOWS_VERSION_MAJOR >= 6 && PHP_WINDOWS_VERSION_MINOR >= 2;
|
||||
|
||||
echo "*** Testing setting the process title ***\n";
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
$Id$
|
||||
(c) 2011 Jerome Loyet
|
||||
The PHP License, version 3.01
|
||||
This is sample real-time status page for FPM. You can change it to better feet your needs.
|
||||
This is sample real-time status page for FPM. You can change it to better fit your needs.
|
||||
-->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
|
||||
@@ -5,5 +5,5 @@ $(SAPI_LITESPEED_PATH): $(PHP_GLOBAL_OBJS) $(PHP_BINARY_OBJS) $(PHP_LITESPEED_OB
|
||||
|
||||
install-litespeed: $(SAPI_LITESPEED_PATH)
|
||||
@echo "Installing PHP LiteSpeed binary: $(INSTALL_ROOT)$(bindir)/"
|
||||
@$(INSTALL) -m 0755 $(SAPI_LITESPEED_PATH) $(INSTALL_ROOT)$(bindir)/lsphp
|
||||
|
||||
@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
|
||||
@$(INSTALL) -m 0755 $(SAPI_LITESPEED_PATH) $(INSTALL_ROOT)$(bindir)/$(program_prefix)lsphp$(program_suffix)
|
||||
@@ -0,0 +1,18 @@
|
||||
--TEST--
|
||||
Bug #75236: infinite loop when printing an error-message
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
ini_set('html_errors', true);
|
||||
ini_set('default_charset', 'ISO-8859-2');
|
||||
|
||||
printf ("before getfilecontent\n");
|
||||
file_get_contents ('no/suchfile');
|
||||
printf ("after getfilecontent\n");
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
before getfilecontent
|
||||
<br />
|
||||
<b>Warning</b>: file_get_contents(no/suchfile): failed to open stream: No such file or directory in <b>%s</b> on line <b>7</b><br />
|
||||
after getfilecontent
|
||||
@@ -11,6 +11,6 @@ libpng-1.6.29
|
||||
libpq-9.6.2
|
||||
libssh2-1.8.0
|
||||
libtidy-20090406
|
||||
libxslt-1.1.29
|
||||
libxml-2.9.4
|
||||
libxslt-1.1.30
|
||||
libxml-2.9.5
|
||||
openssl-1.0.2k
|
||||
Reference in new issue
Block a user