Req #77710 [NEW]: Inconsistent expectation of returned values

From: Date: Thu, 07 Mar 2019 20:52:39 +0000
Subject: Req #77710 [NEW]: Inconsistent expectation of returned values
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-219887@lists.php.net to get a copy of this message
From: v-yitam at microsoft dot com Operating system: Irrelevant PHP version: Irrelevant Package: PDO related Bug Type: Feature/Change Request Bug description:Inconsistent expectation of returned values 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 bug report at https://bugs.php.net/bug.php?id=77710&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77710&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77710&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77710&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=77710&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=77710&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=77710&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=77710&r=needscript Try newer version: https://bugs.php.net/fix.php?id=77710&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=77710&r=support Expected behavior: https://bugs.php.net/fix.php?id=77710&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=77710&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=77710&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=77710&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77710&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=77710&r=dst IIS Stability: https://bugs.php.net/fix.php?id=77710&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=77710&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=77710&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=77710&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=77710&r=mysqlcfg

« previous php.bugs (#219887) next »