]> 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)
ext/pdo/pdo_stmt.c

index 6caf8d6b885a2db13bd2e00b705b039d930e41e1..4a86da967b5d8eec66732a9acbe409605f17f83f 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);
                }
        }