PHP 8.5.0 Beta 1 available for testing

Voting

: three minus three?
(Example: nine)

The Note You're Voting On

frankno dot 94 at gmail dot com
6 years ago
I recently added a note to a small function that went through the results of PDOStatement::fetch and mapped columns to integer or float types.

I forgot to test for columns that can have a null value!

I'm updating the code here, sorry.

This website doesn't let me edit the original comment, so I'm just gonna link to a gist in case it needs even further fixes.

https://gist.github.com/AeonFr/db3b2a8a95753076d9e4da42d29365d2

I basically added this code:

<?php
if ($value === null) {
continue;
}
?>

<< Back to user notes page

To Top