Skip to content

Commit a1c4211

Browse files
committed
Fixed the returned values for PDOStatement::getColumnMeta
1 parent d60748e commit a1c4211

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source/pdo_sqlsrv/pdo_stmt.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,7 @@ int pdo_sqlsrv_stmt_get_attr( _Inout_ pdo_stmt_t *stmt, _In_ zend_long attr, _In
10201020
// colno - The index of the field for which to return the metadata.
10211021
// return_value - zval* consisting of the metadata.
10221022
// Return:
1023-
// 0 for failure, 1 for success.
1023+
// FAILURE for failure, SUCCESS for success.
10241024
int pdo_sqlsrv_stmt_get_col_meta( _Inout_ pdo_stmt_t *stmt, _In_ zend_long colno, _Inout_ zval *return_value TSRMLS_DC)
10251025
{
10261026
PDO_RESET_STMT_ERROR;
@@ -1096,14 +1096,14 @@ int pdo_sqlsrv_stmt_get_col_meta( _Inout_ pdo_stmt_t *stmt, _In_ zend_long colno
10961096
}
10971097
catch( core::CoreException& ) {
10981098

1099-
return 0;
1099+
return FAILURE;
11001100
}
11011101
catch(...) {
11021102

11031103
DIE( "pdo_sqlsrv_stmt_get_col_meta: Unknown exception occurred while retrieving metadata." );
11041104
}
11051105

1106-
return 1;
1106+
return SUCCESS;
11071107
}
11081108

11091109

0 commit comments

Comments
 (0)