|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #77710 Inconsistent expectation of returned values
Submitted: 2019-03-07 20:52 UTC Modified: -
From: v-yitam at microsoft dot com Assigned:
Status: Open Package: PDO related
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: v-yitam at microsoft dot com
New email:
PHP Version: OS:


 [2019-03-07 20:52 UTC] v-yitam at microsoft dot com
PDO expects different returned values from PDOStatement::getColumnMeta()

 - the other methods in the API returns 0 for failure and 1 for success
 - but getColumnMeta should return FAILURE (-1) or SUCCESS(0) instead (enum ZEND_RESULT_CODE?)

Confirmed this part of the PDO code is the same in PHP 5.6, 7.1, 7.2 and 7.3

static PHP_METHOD(PDOStatement, getColumnMeta)
	if (FAILURE == stmt->methods->get_column_meta(stmt, colno, return_value)) {


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Jan 21 05:01:23 2020 UTC