com php-src: Fix setting of empty string resource.: ext/pdo/pdo_sql_parser.c ext/pdo/pdo_sql_parser.r e

From: Date: Sun, 08 Nov 2015 03:22:51 +0000
Subject: com php-src: Fix setting of empty string resource.: ext/pdo/pdo_sql_parser.c ext/pdo/pdo_sql_parser.r e
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-89692@lists.php.net to get a copy of this message
Commit: 3bdb7cf56cf18b4c8164b15c47481a82fdfa4014 Author: Fabian Franz <fabian@root397.premium-rootserver.net> Thu, 5 Nov 2015 18:21:45 +0000 Committer: Anatol Belski <ab@php.net> Sun, 8 Nov 2015 04:22:51 +0100 Parents: 84abd7f7bd586ad3220f2155ba09f308927194c7 Branches: PHP-7.0.0 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3bdb7cf56cf18b4c8164b15c47481a82fdfa4014 Log: Fix setting of empty string resource. Changed paths: M ext/pdo/pdo_sql_parser.c M ext/pdo/pdo_sql_parser.re Diff: diff --git a/ext/pdo/pdo_sql_parser.c b/ext/pdo/pdo_sql_parser.c index 0907571..22e5fcf 100644 --- a/ext/pdo/pdo_sql_parser.c +++ b/ext/pdo/pdo_sql_parser.c @@ -576,8 +576,7 @@ safe: buf = php_stream_copy_to_mem(stm, PHP_STREAM_COPY_ALL, 0); if (!buf) { - ret = -1; - goto clean_up; + buf = ZSTR_EMPTY_ALLOC(); } if (!stmt->dbh->methods->quoter(stmt->dbh, ZSTR_VAL(buf), ZSTR_LEN(buf), &plc->quoted, &plc->qlen, param->param_type)) { diff --git a/ext/pdo/pdo_sql_parser.re b/ext/pdo/pdo_sql_parser.re index 96c131f..629f307 100644 --- a/ext/pdo/pdo_sql_parser.re +++ b/ext/pdo/pdo_sql_parser.re @@ -218,8 +218,7 @@ safe: buf = php_stream_copy_to_mem(stm, PHP_STREAM_COPY_ALL, 0); if (!buf) { - ret = -1; - goto clean_up; + buf = ZSTR_EMPTY_ALLOC(); } if (!stmt->dbh->methods->quoter(stmt->dbh, ZSTR_VAL(buf), ZSTR_LEN(buf), &plc->quoted, &plc->qlen, param->param_type)) {

« previous php.cvs (#89692) next »