com php-src: Merge branch 'PHP-5.6' into PHP-7.0: NEWS ext/pdo/pdo_stmt.c

From: Date: Fri, 12 Aug 2016 23:21:57 +0000
Subject: com php-src: Merge branch 'PHP-5.6' into PHP-7.0: NEWS ext/pdo/pdo_stmt.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-93763@lists.php.net to get a copy of this message
Commit: 175d94b6e5df80e2eadec0460c1ad21bda12c02e Author: Christoph M. Becker <cmbecker69@gmx.de> Sat, 13 Aug 2016 01:19:09 +0200 Parents: 92a076a92bf7d2fb20e0bc5d376ce65fab268b52 7938ebf6c1b302d3d1b1bfb798f1cf6f07e1e178 Branches: PHP-7.0 PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=175d94b6e5df80e2eadec0460c1ad21bda12c02e Log: Merge branch 'PHP-5.6' into PHP-7.0 Changed paths: MM NEWS MM ext/pdo/pdo_stmt.c Diff: diff --cc NEWS index d031042,90215cd..4209128 --- 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 8d1d909,f5c295c..d135467 --- 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; - } } } }

« previous php.cvs (#93763) next »