php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #54405
Patch php-bug-54405.patch revision 2011-05-01 23:28 UTC by jinmoku at hotmail dot com

Patch php-bug-54405.patch for PDO related Bug #54405

Patch version 2011-05-01 23:28 UTC

Return to Bug #54405 | Download this patch
Patch Revisions:

Developer: jinmoku@hotmail.com

Index: ext/pdo/pdo_stmt.c
===================================================================
--- ext/pdo/pdo_stmt.c	(revision 310697)
+++ ext/pdo/pdo_stmt.c	(working copy)
@@ -1515,6 +1515,22 @@
 		}
 		break;
 
+	case PDO_FETCH_GROUP:
+		switch(ZEND_NUM_ARGS()) {
+		case 0:
+		case 1:
+			stmt->fetch.column = 0;
+			break;
+		case 2:
+			convert_to_long(arg2);
+			stmt->fetch.column = Z_LVAL_P(arg2);
+			break;
+		case 3:
+			pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "Third parameter not allowed for PDO::FETCH_GROUP" TSRMLS_CC);
+			error = 1;
+		}
+		break;
+
 	default:
 		if (ZEND_NUM_ARGS() > 1) {
 			pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "Extraneous additional parameters" TSRMLS_CC);
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 18:01:29 2024 UTC