summaryrefslogtreecommitdiff
path: root/ext/pdo
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-11-24 16:21:43 +0000
committerIlia Alshanetsky <iliaa@php.net>2005-11-24 16:21:43 +0000
commit8e49bacf953635139f9a2621f3ea0a6e7c394740 (patch)
treefdd4a5f71617e0581a30d0395e387bdd31112b25 /ext/pdo
parenta570981151796c29b0696aba0b5d4531fac9ccba (diff)
downloadphp-git-8e49bacf953635139f9a2621f3ea0a6e7c394740.tar.gz
Fixed bug #35358 (Incorrect error messages for PDO class constants).
Diffstat (limited to 'ext/pdo')
-rwxr-xr-xext/pdo/pdo_dbh.c10
-rwxr-xr-xext/pdo/pdo_stmt.c10
2 files changed, 10 insertions, 10 deletions
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c
index bd12a1eaed..883f98defc 100755
--- a/ext/pdo/pdo_dbh.c
+++ b/ext/pdo/pdo_dbh.c
@@ -508,7 +508,7 @@ static PHP_METHOD(PDO, prepare)
|| 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 @@ static PHP_METHOD(PDO, prepare)
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 @@ static PHP_METHOD(PDO, setAttribute)
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 @@ static PHP_METHOD(PDO, setAttribute)
|| 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 @@ static PHP_METHOD(PDO, setAttribute)
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();
diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c
index 7daa189dab..db2b45e769 100755
--- a/ext/pdo/pdo_stmt.c
+++ b/ext/pdo/pdo_stmt.c
@@ -1119,7 +1119,7 @@ static int pdo_stmt_verify_mode(pdo_stmt_t *stmt, int mode, int fetch_all TSRMLS
#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 @@ static int pdo_stmt_verify_mode(pdo_stmt_t *stmt, int mode, int fetch_all TSRMLS
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 @@ static PHP_METHOD(PDOStatement, fetchAll)
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;