Em Ter, 2008-11-04 às 18:28 +0000, David Coallier escreveu:
> davidc                Tue Nov  4 18:28:42 2008 UTC
> 
>   Modified files:              (Branch: PHP_5_3)
>     /php-src/ext/pdo  pdo_dbh.c 
>   Log:
>   - MFH
>   - Bug #44154: [DOC] Return 3 elements at all times. If the dbh stmt doesn't 
> have
>     an error code we used to return an array with one element. For the sake
>     of consistency and verification of returned values at userland we are now
>     returning an array with 3 elements. Note the two last elements are null 
> but
>     present
>   
>   - Bug #4413: [DOC] If the error code returned by the DBH is null, we return
>     a null value. This is used in order to help with empty error codes.
>   
>   
>   
> http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_dbh.c?r1=1.82.2.31.2.17.2.13&r2=1.82.2.31.2.17.2.14&diff_format=u
> Index: php-src/ext/pdo/pdo_dbh.c
> diff -u php-src/ext/pdo/pdo_dbh.c:1.82.2.31.2.17.2.13 
> php-src/ext/pdo/pdo_dbh.c:1.82.2.31.2.17.2.14
> --- php-src/ext/pdo/pdo_dbh.c:1.82.2.31.2.17.2.13     Thu Oct  9 13:00:58 2008
> +++ php-src/ext/pdo/pdo_dbh.c Tue Nov  4 18:28:41 2008
> @@ -18,7 +18,7 @@
>    +----------------------------------------------------------------------+
>  */
>  
> -/* $Id: pdo_dbh.c,v 1.82.2.31.2.17.2.13 2008/10/09 13:00:58 felipe Exp $ */
> +/* $Id: pdo_dbh.c,v 1.82.2.31.2.17.2.14 2008/11/04 18:28:41 davidc Exp $ */
>  
>  /* The PDO Database Handle Class */
>  
> @@ -983,6 +983,11 @@
>               RETURN_STRING(dbh->query_stmt->error_code, 1);
>       }
>       
> +     if (dbh->error_code[0] == '\0') {
> +             RETURN_NULL();
> +     }
> +
> +     // Then we get back to the default fallback
>       RETURN_STRING(dbh->error_code, 1);
>  }
>  /* }}} */
> @@ -1004,6 +1009,8 @@
>               add_next_index_string(return_value, 
> dbh->query_stmt->error_code, 1);
>       } else {
>               add_next_index_string(return_value, dbh->error_code, 1);
> +             add_next_index_null(return_value);
> +             add_next_index_null(return_value);
>       }
>       if (dbh->methods->fetch_err) {
>               dbh->methods->fetch_err(dbh, dbh->query_stmt, return_value 
> TSRMLS_CC);
> 
> 

I think that broken some tests:

PDO::MYSQL_ATTR_INIT_COMMAND
[ext/pdo_mysql/tests/pdo_mysql_attr_init_command.phpt]
MySQL PDO->errorInfo() [ext/pdo_mysql/tests/pdo_mysql_errorinfo.phpt]
MySQL PDO->exec(), affected rows
[ext/pdo_mysql/tests/pdo_mysql_exec.phpt]
MySQL PDO->exec(), SELECT
[ext/pdo_mysql/tests/pdo_mysql_exec_select.phpt]
MySQL PDOStatement->errorInfo();
[ext/pdo_mysql/tests/pdo_mysql_stmt_errorinfo.phpt]


And the // comment-style is incorrect, see CODING_STANDARDS file.


-- 
Regards,
Felipe Pena


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to