Doc #77710 [Ver->Csd]: Inconsistent expectation of returned values

From: Date: Tue, 10 Mar 2020 10:08:15 +0000
Subject: Doc #77710 [Ver->Csd]: Inconsistent expectation of returned values
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-17390@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77710&edit=1 ID: 77710 Updated by: phpdocbot@php.net Reported by: v-yitam at microsoft dot com Summary: Inconsistent expectation of returned values -Status: Verified +Status: Closed Type: Documentation Problem Package: PDO related Operating System: Irrelevant PHP Version: Irrelevant Assigned To: cmb Block user comment: N Private report: N New Comment: Automatic comment on behalf of cmb Revision: http://git.php.net/?p=doc/en.git;a=commit;h=3a68a5895a1188492f3d4d28da01a0f0fa6f366a Log: Fix #77710: Inconsistent expectation of returned values Previous Comments: ------------------------------------------------------------------------ [2020-03-10 10:07:10] cmb@php.net Automatic comment from SVN on behalf of cmb Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=349367 Log: Fix #77710: Inconsistent expectation of returned values ------------------------------------------------------------------------ [2020-03-10 10:05:15] cmb@php.net Indeed, the documentation[1] is in error. [1] <https://www.php.net/manual/en/internals2.pdo.implementing.php#internals2.pdo.implementing.statement.get-col-meta> ------------------------------------------------------------------------ [2019-03-07 20:52:39] v-yitam at microsoft dot com Description: ------------ 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) { ... PDO_STMT_CLEAR_ERR(); if (FAILURE == stmt->methods->get_column_meta(stmt, colno, return_value)) { PDO_HANDLE_STMT_ERR(); RETURN_FALSE; } ... } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=77710&edit=1

« previous php.doc.bugs (#17390) next »