note 124118 added to pdostatement.getcolumnmeta

From: Date: Fri, 16 Aug 2019 09:32:42 +0000
Subject: note 124118 added to pdostatement.getcolumnmeta
Groups: php.notes 
Request: Send a blank email to php-notes+get-211891@lists.php.net to get a copy of this message
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; } ?> ---- Server IP: 208.43.231.9 Probable Submitter: 185.85.3.168 (proxied: 81.184.115.41) ---- Manual Page -- http://php.net/manual/en/pdostatement.getcolumnmeta.php Edit -- https://master.php.net/note/edit/124118 Del: integrated -- https://master.php.net/note/delete/124118/integrated Del: useless -- https://master.php.net/note/delete/124118/useless Del: bad code -- https://master.php.net/note/delete/124118/bad+code Del: spam -- https://master.php.net/note/delete/124118/spam Del: non-english -- https://master.php.net/note/delete/124118/non-english Del: in docs -- https://master.php.net/note/delete/124118/in+docs Del: other reasons-- https://master.php.net/note/delete/124118 Reject -- https://master.php.net/note/reject/124118 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#211891) next »