]> granicus.if.org Git - php/commitdiff
Fixed bug #52104 (bindColumn creates Warning regardless of ATTR_ERRMODE settings).
authorIlia Alshanetsky <iliaa@php.net>
Wed, 1 Jun 2011 13:23:25 +0000 (13:23 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 1 Jun 2011 13:23:25 +0000 (13:23 +0000)
NEWS
ext/pdo/pdo_stmt.c

diff --git a/NEWS b/NEWS
index 29d6bd95bcc0acf6e79e50b82d6868837528e08f..34b2c8b9bf0a581e14b55def1462b3dfdf8a3ad9 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -115,6 +115,10 @@ PHP                                                                        NEWS
     set mysqlnd.net_cmd_buffer_size to at least 9000. (Andrey)
   . Fixed bug #54674 mysqlnd valid_sjis_(head|tail) is using invalid operator
     and range). (nihen at megabbs dot com, Andrey)
+
+- PDO extension:
+  . Fixed bug #52104 (bindColumn creates Warning regardless of ATTR_ERRMODE 
+    settings). (Ilia)
     
 - PDO DBlib driver:
   . Fixed bug #54167 (PDO_DBLIB returns null on SQLUNIQUE field).
index a8435d235a1d90c00bf453fa7166b79b849ba9e9..b8a6f5f0f8c92f8f3d4f1a3b48f9e3da39219de4 100755 (executable)
@@ -349,7 +349,10 @@ static int really_register_bound_param(struct pdo_bound_param_data *param, pdo_s
                /* if you prepare and then execute passing an array of params keyed by names,
                 * then this will trigger, and we don't want that */
                if (param->paramno == -1) {
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Did not found column name '%s' in the defined columns; it will not be bound", param->name);
+                       char *tmp;
+                       spprintf(&tmp, 0, "Did not find column name '%s' in the defined columns; it will not be bound", param->name);
+                       pdo_raise_impl_error(stmt->dbh, stmt, "HY000", tmp TSRMLS_CC);
+                       efree(tmp);
                }
        }