From: Christoph M. Becker Date: Fri, 12 Aug 2016 23:19:09 +0000 (+0200) Subject: Merge branch 'PHP-5.6' into PHP-7.0 X-Git-Tag: php-7.1.0beta3~61^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=175d94b6e5df80e2eadec0460c1ad21bda12c02e;p=php Merge branch 'PHP-5.6' into PHP-7.0 --- 175d94b6e5df80e2eadec0460c1ad21bda12c02e diff --cc NEWS index d031042485,90215cdbfc..4209128763 --- a/NEWS +++ b/NEWS @@@ -1,52 -1,20 +1,54 @@@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? 2016, PHP 5.6.26 +?? ??? 2016 PHP 7.0.11 -- MSSQL: - . Fixed bug #72039 (Use of uninitialised value on mssql_guid_string). (Kalle) +- Core: + . Fixed bug #72813 (Segfault with __get returned by ref). (Laruence) + . Fixed bug #72767 (PHP Segfaults when trying to expand an infinite operator). + (Nikita) + +- GD: + . Fixed bug #72709 (imagesetstyle() causes OOB read for empty $styles). (cmb) + +- OCI8 + . Fixed invalid handle error with Implicit Result Sets. (Chris Jones) + . Fixed bug #72524 (Binding null values triggers ORA-24816 error). (Chris Jones) - PDO: + . Fixed bug #72788 (Invalid memory access when using persistent PDO + connection). (Keyur) + . Fixed bug #72791 (Memory leak in PDO persistent connection handling). (Keyur) + . Fixed bug #60665 (call to empty() on NULL result using PDO::FETCH_LAZY + returns false). (cmb) -18 Aug 2016, PHP 5.6.25 +- Session: + . Fixed bug #72724 (PHP7: session-uploadprogress kills httpd). (Nikita) + +- Standard: + . Fixed bug #55451 (substr_compare NULL length interpreted as 0). (Lauri + Kenttä) + +- Streams: + . Fixed bug #72764 (ftps:// opendir wrapper data channel encryption fails + with IIS FTP 7.5, 8.5). (vhuk) + + +?? ??? 2016 PHP 7.0.10 - Core: + . Fixed bug #72629 (Caught exception assignment to variables ignores + references). (Laruence) + . Fixed bug #72594 (Calling an earlier instance of an included anonymous + class fatals). (Laruence) . Fixed bug #72581 (previous property undefined in Exception after deserialization). (Laruence) + . Fixed bug #72496 (Cannot declare public method with signature incompatible + with parent private method). (Pedro Magalhães) . Fixed bug #72024 (microtime() leaks memory). (maroszek at gmx dot net) + . Fixed bug #71911 (Unable to set --enable-debug on building extensions by + phpize on Windows). (Yuji Uchiyama) + . Fixed bug causing ClosedGeneratorException being thrown into the calling + code instead of the Generator yielding from. (Bob) . Implemented FR #72614 (Support "nmake test" on building extensions by phpize). (Yuji Uchiyama) . Fixed bug #72641 (phpize (on Windows) ignores PHP_PREFIX). diff --cc ext/pdo/pdo_stmt.c index 8d1d909acc,f5c295c26c..d135467192 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@@ -2551,20 -2616,23 +2551,27 @@@ static int row_prop_exists(zval *object if (stmt) { if (Z_TYPE_P(member) == IS_LONG) { return Z_LVAL_P(member) >= 0 && Z_LVAL_P(member) < stmt->column_count; + } else if (Z_TYPE_P(member) == IS_STRING) { + if (is_numeric_string_ex(Z_STRVAL_P(member), Z_STRLEN_P(member), &lval, NULL, 0, NULL) == IS_LONG) { + return lval >=0 && lval < stmt->column_count; + } } else { convert_to_string(member); + } - /* TODO: replace this with a hash of available column names to column - * numbers */ - for (colno = 0; colno < stmt->column_count; colno++) { - if (strcmp(stmt->columns[colno].name, Z_STRVAL_P(member)) == 0) { + /* TODO: replace this with a hash of available column names to column + * numbers */ + for (colno = 0; colno < stmt->column_count; colno++) { + if (ZSTR_LEN(stmt->columns[colno].name) == Z_STRLEN_P(member) && + strncmp(ZSTR_VAL(stmt->columns[colno].name), Z_STRVAL_P(member), Z_STRLEN_P(member)) == 0) { - return 1; + int res; - zval *val; ++ zval val; + - MAKE_STD_ZVAL(val); - fetch_value(stmt, val, colno, NULL TSRMLS_CC); - res = check_empty ? i_zend_is_true(val) : Z_TYPE_P(val) != IS_NULL; - zval_ptr_dtor(&val); ++ fetch_value(stmt, &val, colno, NULL TSRMLS_CC); ++ res = check_empty ? i_zend_is_true(&val) : Z_TYPE(val) != IS_NULL; ++ zval_dtor(&val); + + return res; - } } } }