From 136061e087e03a72f97a9f45ec4be3944077df6f Mon Sep 17 00:00:00 2001 From: Alex Dupre Date: Thu, 23 Dec 2004 09:53:11 +0000 Subject: Fix return value for insert/update queries. Submitted by: "Liddelow, Tim" Obtained from: PHP CVS --- databases/php5-mssql/Makefile | 1 + databases/php5-mssql/files/patch-php_mssql.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 databases/php5-mssql/files/patch-php_mssql.c (limited to 'databases/php5-mssql') diff --git a/databases/php5-mssql/Makefile b/databases/php5-mssql/Makefile index 3fdb36db6fb5..94f13b3de2ad 100644 --- a/databases/php5-mssql/Makefile +++ b/databases/php5-mssql/Makefile @@ -5,6 +5,7 @@ # $FreeBSD$ # +PORTREVISION= 2 CATEGORIES= databases MASTERDIR= ${.CURDIR}/../../lang/php5 diff --git a/databases/php5-mssql/files/patch-php_mssql.c b/databases/php5-mssql/files/patch-php_mssql.c new file mode 100644 index 000000000000..cd45e4f7acf9 --- /dev/null +++ b/databases/php5-mssql/files/patch-php_mssql.c @@ -0,0 +1,15 @@ +--- php_mssql.c 2004/12/06 19:45:57 1.137.2.6 ++++ php_mssql.c 2004/12/16 21:49:36 1.137.2.7 +@@ -1196,10 +1196,8 @@ PHP_FUNCTION(mssql_query) + while ((num_fields = dbnumcols(mssql_ptr->link)) <= 0 && retvalue == SUCCEED) { + retvalue = dbresults(mssql_ptr->link); + } +- if (retvalue != SUCCEED) { +- RETURN_FALSE; +- } +- if ((num_fields = dbnumcols(mssql_ptr->link)) <= 0) { ++ ++ if (num_fields <= 0) { + RETURN_TRUE; + } + -- cgit v1.2.3