PHP 8.5.0 Alpha 4 available for testing

Voting

: max(eight, one)?
(Example: nine)

The Note You're Voting On

terry at bitsoup dot com
19 years ago
WARNING:
fetch() does NOT adhere to SQL-92 SQLSTATE standard when dealing with empty datasets.

Instead of setting the errorcode class to 20 to indicate "no data found", it returns a class of 00 indicating success, and returns NULL to the caller.

This also prevents the exception mechainsm from firing.

Programmers will need to explicitly code tests for empty resultsets after any fetch*() instead of relying on the default behavior of the RDBMS.

I tried logging this as a bug, but it was dismissed as "working as intended". Just a head's up.

<< Back to user notes page

To Top