Hi, this might be a good thing for consistency and maybe reflect expectations more, but changing a warning to (possibly) an exception, which is fatal is a quite big change. Isn't it?
johannes On Wed, 2011-06-01 at 13:23 +0000, Ilia Alshanetsky wrote: > iliaa Wed, 01 Jun 2011 13:23:25 +0000 > > Revision: http://svn.php.net/viewvc?view=revision&revision=311711 > > Log: > Fixed bug #52104 (bindColumn creates Warning regardless of ATTR_ERRMODE > settings). > > Bug: http://bugs.php.net/52104 (Assigned) bindColumn creates Warning > regardless of ATTR_ERRMODE settings > > Changed paths: > U php/php-src/branches/PHP_5_3/NEWS > U php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c > U php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c > U php/php-src/trunk/ext/pdo/pdo_stmt.c > > Modified: php/php-src/branches/PHP_5_3/NEWS > =================================================================== > --- php/php-src/branches/PHP_5_3/NEWS 2011-06-01 12:53:07 UTC (rev 311710) > +++ php/php-src/branches/PHP_5_3/NEWS 2011-06-01 13:23:25 UTC (rev 311711) > @@ -115,6 +115,10 @@ > 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). > > Modified: php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c > =================================================================== > --- php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c 2011-06-01 12:53:07 UTC > (rev 311710) > +++ php/php-src/branches/PHP_5_3/ext/pdo/pdo_stmt.c 2011-06-01 13:23:25 UTC > (rev 311711) > @@ -349,7 +349,10 @@ > /* 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); > } > } > > > Modified: php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c > =================================================================== > --- php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c 2011-06-01 12:53:07 UTC > (rev 311710) > +++ php/php-src/branches/PHP_5_4/ext/pdo/pdo_stmt.c 2011-06-01 13:23:25 UTC > (rev 311711) > @@ -349,7 +349,10 @@ > /* 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); > } > } > > > Modified: php/php-src/trunk/ext/pdo/pdo_stmt.c > =================================================================== > --- php/php-src/trunk/ext/pdo/pdo_stmt.c 2011-06-01 12:53:07 UTC (rev > 311710) > +++ php/php-src/trunk/ext/pdo/pdo_stmt.c 2011-06-01 13:23:25 UTC (rev > 311711) > @@ -349,7 +349,10 @@ > /* 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); > } > } > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
