iliaa           Thu Nov 24 11:21:46 2005 EDT

  Modified files:              (Branch: PHP_5_1)
    /php-src/ext/pdo    pdo_stmt.c pdo_dbh.c 
    /php-src    NEWS 
  Log:
  Fixed bug #35358 (Incorrect error messages for PDO class constants).
  
  
http://cvs.php.net/diff.php/php-src/ext/pdo/pdo_stmt.c?r1=1.118.2.17&r2=1.118.2.18&ty=u
Index: php-src/ext/pdo/pdo_stmt.c
diff -u php-src/ext/pdo/pdo_stmt.c:1.118.2.17 
php-src/ext/pdo/pdo_stmt.c:1.118.2.18
--- php-src/ext/pdo/pdo_stmt.c:1.118.2.17       Wed Nov 16 01:32:33 2005
+++ php-src/ext/pdo/pdo_stmt.c  Thu Nov 24 11:21:41 2005
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: pdo_stmt.c,v 1.118.2.17 2005/11/16 06:32:33 wez Exp $ */
+/* $Id: pdo_stmt.c,v 1.118.2.18 2005/11/24 16:21:41 iliaa Exp $ */
 
 /* The PDO Statement Handle Class */
 
@@ -1119,7 +1119,7 @@
 
 #if PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 1
        if ((flags & PDO_FETCH_SERIALIZE) == PDO_FETCH_SERIALIZE) {
-               pdo_raise_impl_error(stmt->dbh, stmt, "IM001", 
"PDO_FETCH_SERIALIZE is not supported in this PHP version" TSRMLS_CC);
+               pdo_raise_impl_error(stmt->dbh, stmt, "IM001", 
"PDO::FETCH_SERIALIZE is not supported in this PHP version" TSRMLS_CC);
                return 0;
        }
 #endif
@@ -1127,18 +1127,18 @@
        switch(mode) {
        case PDO_FETCH_FUNC:
                if (!fetch_all) {
-                       pdo_raise_impl_error(stmt->dbh, stmt, "HY000", 
"PDO_FETCH_FUNC is only allowed in PDOStatement::fetchAll()" TSRMLS_CC);
+                       pdo_raise_impl_error(stmt->dbh, stmt, "HY000", 
"PDO::FETCH_FUNC is only allowed in PDOStatement::fetchAll()" TSRMLS_CC);
                        return 0;
                }
                return 1;
        
        default:
                if ((flags & PDO_FETCH_SERIALIZE) == PDO_FETCH_SERIALIZE) {
-                       pdo_raise_impl_error(stmt->dbh, stmt, "HY000", 
"PDO_FETCH_SERIALIZE can only be used together with PDO_FETCH_CLASS" TSRMLS_CC);
+                       pdo_raise_impl_error(stmt->dbh, stmt, "HY000", 
"PDO::FETCH_SERIALIZE can only be used together with PDO::FETCH_CLASS" 
TSRMLS_CC);
                        return 0;
                }
                if ((flags & PDO_FETCH_CLASSTYPE) == PDO_FETCH_CLASSTYPE) {
-                       pdo_raise_impl_error(stmt->dbh, stmt, "HY000", 
"PDO_FETCH_CLASSTYPE can only be used together with PDO_FETCH_CLASS" TSRMLS_CC);
+                       pdo_raise_impl_error(stmt->dbh, stmt, "HY000", 
"PDO::FETCH_CLASSTYPE can only be used together with PDO::FETCH_CLASS" 
TSRMLS_CC);
                        return 0;
                }
                if (mode >= PDO_FETCH__MAX) {
@@ -1366,7 +1366,7 @@
                        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_COLUMN" TSRMLS_CC);
+                       pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "Third 
parameter not allowed for PDO::FETCH_COLUMN" TSRMLS_CC);
                        error = 1;
                }
                break;
http://cvs.php.net/diff.php/php-src/ext/pdo/pdo_dbh.c?r1=1.82.2.15&r2=1.82.2.16&ty=u
Index: php-src/ext/pdo/pdo_dbh.c
diff -u php-src/ext/pdo/pdo_dbh.c:1.82.2.15 php-src/ext/pdo/pdo_dbh.c:1.82.2.16
--- php-src/ext/pdo/pdo_dbh.c:1.82.2.15 Sun Nov 20 15:06:28 2005
+++ php-src/ext/pdo/pdo_dbh.c   Thu Nov 24 11:21:42 2005
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: pdo_dbh.c,v 1.82.2.15 2005/11/20 20:06:28 iliaa Exp $ */
+/* $Id: pdo_dbh.c,v 1.82.2.16 2005/11/24 16:21:42 iliaa Exp $ */
 
 /* The PDO Database Handle Class */
 
@@ -508,7 +508,7 @@
                        || zend_lookup_class(Z_STRVAL_PP(item), 
Z_STRLEN_PP(item), &pce TSRMLS_CC) == FAILURE
                ) {
                        pdo_raise_impl_error(dbh, NULL, "HY000", 
-                               "PDO_ATTR_STATEMENT_CLASS requires format 
array(classname, ctor_args); "
+                               "PDO::ATTR_STATEMENT_CLASS requires format 
array(classname, ctor_args); "
                                "the classname must be a string specifying an 
existing class"
                                TSRMLS_CC);
                        PDO_HANDLE_DBH_ERR();
@@ -530,7 +530,7 @@
                if (zend_hash_index_find(Z_ARRVAL_PP(opt), 1, (void**)&item) == 
SUCCESS) {
                        if (Z_TYPE_PP(item) != IS_ARRAY) {
                                pdo_raise_impl_error(dbh, NULL, "HY000", 
-                                       "PDO_ATTR_STATEMENT_CLASS requires 
format array(classname, ctor_args); "
+                                       "PDO::ATTR_STATEMENT_CLASS requires 
format array(classname, ctor_args); "
                                        "ctor_args must be an array"
                                TSRMLS_CC);
                                PDO_HANDLE_DBH_ERR();
@@ -717,7 +717,7 @@
 
                        if (dbh->is_persistent) {
                                pdo_raise_impl_error(dbh, NULL, "HY000", 
-                                       "PDO_ATTR_STATEMENT_CLASS cannot be 
used with persistent PDO instances"
+                                       "PDO::ATTR_STATEMENT_CLASS cannot be 
used with persistent PDO instances"
                                        TSRMLS_CC);
                                PDO_HANDLE_DBH_ERR();
                                RETURN_FALSE;
@@ -728,7 +728,7 @@
                                || zend_lookup_class(Z_STRVAL_PP(item), 
Z_STRLEN_PP(item), &pce TSRMLS_CC) == FAILURE
                        ) {
                                pdo_raise_impl_error(dbh, NULL, "HY000", 
-                                       "PDO_ATTR_STATEMENT_CLASS requires 
format array(classname, array(ctor_args)); "
+                                       "PDO::ATTR_STATEMENT_CLASS requires 
format array(classname, array(ctor_args)); "
                                        "the classname must be a string 
specifying an existing class"
                                        TSRMLS_CC);
                                PDO_HANDLE_DBH_ERR();
@@ -754,7 +754,7 @@
                        if (zend_hash_index_find(Z_ARRVAL_P(value), 1, 
(void**)&item) == SUCCESS) {
                                if (Z_TYPE_PP(item) != IS_ARRAY) {
                                        pdo_raise_impl_error(dbh, NULL, 
"HY000", 
-                                               "PDO_ATTR_STATEMENT_CLASS 
requires format array(classname, array(ctor_args)); "
+                                               "PDO::ATTR_STATEMENT_CLASS 
requires format array(classname, array(ctor_args)); "
                                                "ctor_args must be an array"
                                        TSRMLS_CC);
                                        PDO_HANDLE_DBH_ERR();
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.220&r2=1.2027.2.221&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.220 php-src/NEWS:1.2027.2.221
--- php-src/NEWS:1.2027.2.220   Thu Nov 24 06:33:10 2005
+++ php-src/NEWS        Thu Nov 24 11:21:43 2005
@@ -6,6 +6,7 @@
   frame was called from an object. (Sebastian)
 - Fixed bug #35360 (exceptions in interactive mode (php -a) may cause crash).
   (Dmitry)
+- Fixed bug #35358 (Incorrect error messages for PDO class constants). (Ilia)
 
 24 Nov 2005, PHP 5.1
 - Added support for class constants and static members for internal classes. 

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

Reply via email to