summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorFabian Franz <fabian@root397.premium-rootserver.net>2015-11-05 18:21:45 +0000
committerAnatol Belski <ab@php.net>2015-11-08 04:22:51 +0100
commit3bdb7cf56cf18b4c8164b15c47481a82fdfa4014 (patch)
treed572e961f9a60415c3221ebcaa332536f55483b0 /ext
parent84abd7f7bd586ad3220f2155ba09f308927194c7 (diff)
downloadphp-git-3bdb7cf56cf18b4c8164b15c47481a82fdfa4014.tar.gz
Fix setting of empty string resource.
Diffstat (limited to 'ext')
-rw-r--r--ext/pdo/pdo_sql_parser.c3
-rw-r--r--ext/pdo/pdo_sql_parser.re3
2 files changed, 2 insertions, 4 deletions
diff --git a/ext/pdo/pdo_sql_parser.c b/ext/pdo/pdo_sql_parser.c
index 0907571e08..22e5fcf35b 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 96c131fe96..629f3079c2 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)) {