summaryrefslogtreecommitdiff
path: root/ext/mssql/php_mssql.c
diff options
context:
space:
mode:
authorKalle Sommer Nielsen <kalle@php.net>2009-02-23 21:21:02 +0000
committerKalle Sommer Nielsen <kalle@php.net>2009-02-23 21:21:02 +0000
commit1783db8209b4e1beb48a2a7d7ec2f5bdfd4c3041 (patch)
treee42c93d74a233261f5d66609570853a64046da90 /ext/mssql/php_mssql.c
parent0f3831a2f1aee0a5e4cb6444fab277695e5741c8 (diff)
downloadphp-git-1783db8209b4e1beb48a2a7d7ec2f5bdfd4c3041.tar.gz
Fixed #37209 (mssql_execute with non fatal errors)
Diffstat (limited to 'ext/mssql/php_mssql.c')
-rw-r--r--ext/mssql/php_mssql.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c
index b1f865e08b..400de7376f 100644
--- a/ext/mssql/php_mssql.c
+++ b/ext/mssql/php_mssql.c
@@ -2101,6 +2101,7 @@ PHP_FUNCTION(mssql_execute)
mssql_result *result;
int num_fields;
int batchsize;
+ int exec_retval;
batchsize = MS_SQL_G(batchsize);
@@ -2111,10 +2112,15 @@ PHP_FUNCTION(mssql_execute)
ZEND_FETCH_RESOURCE(statement, mssql_statement *, &stmt, -1, "MS SQL-Statement", le_statement);
mssql_ptr=statement->link;
+ exec_retval = dbrpcexec(mssql_ptr->link);
- if (dbrpcexec(mssql_ptr->link)==FAIL || dbsqlok(mssql_ptr->link)==FAIL) {
+ if (exec_retval == FAIL || dbsqlok(mssql_ptr->link) == FAIL) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "stored procedure execution failed");
- dbcancel(mssql_ptr->link);
+
+ if (exec_retval == FAIL) {
+ dbcancel(mssql_ptr->link);
+ }
+
RETURN_FALSE;
}