Bug #81189 [NEW]: PDOStatement::fetchAll() should return array|false

From: Date: Tue, 22 Jun 2021 02:27:33 +0000
Subject: Bug #81189 [NEW]: PDOStatement::fetchAll() should return array|false
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-234580@lists.php.net to get a copy of this message
From: corey dot taylor dot fl at gmail dot com Operating system: PHP version: 8.1.0alpha1 Package: PDO Core Bug Type: Bug Bug description:PDOStatement::fetchAll() should return array|false Description: ------------ The new tentative return type for fetchAll() is just array, but it's documented as array|false. https://www.php.net/manual/en/pdostatement.fetchall.php An empty array is returned if there are zero results to fetch, or false on failure. https://github.com/php/php-src/blob/master/ext/pdo/pdo_stmt.stub.php#L40 /** @tentative-return-type */ public function fetchAll(int $mode = PDO::FETCH_DEFAULT, mixed ...$args): array {} -- Edit bug report at https://bugs.php.net/bug.php?id=81189&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=81189&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=81189&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=81189&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=81189&r=needscript Try newer version: https://bugs.php.net/fix.php?id=81189&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=81189&r=support Expected behavior: https://bugs.php.net/fix.php?id=81189&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=81189&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=81189&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=81189&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=81189&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=81189&r=dst IIS Stability: https://bugs.php.net/fix.php?id=81189&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=81189&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=81189&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=81189&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=81189&r=mysqlcfg

« previous php.bugs (#234580) next »