note 129773 added to directory.read

From: Date: Thu, 26 Sep 2024 11:11:04 +0000
Subject: note 129773 added to directory.read
Groups: php.notes 
Request: Send a blank email to php-notes+get-221556@lists.php.net to get a copy of this message
<?php while ($row=$dir->read()) ?> // will break as soon as $row can be casted to false, which is the case for a directory named "0" <?php while (false !== ($row=$dir->read())) ?> // will do the job as expected ---- Server IP: 45.112.84.4 Probable Submitter: 80.90.5.137 (proxied: 87.134.79.176) ---- Manual Page -- https://php.net/manual/en/directory.read.php Edit -- https://main.php.net/note/edit/129773 Del: integrated -- https://main.php.net/note/delete/129773/integrated Del: useless -- https://main.php.net/note/delete/129773/useless Del: bad code -- https://main.php.net/note/delete/129773/bad+code Del: spam -- https://main.php.net/note/delete/129773/spam Del: non-english -- https://main.php.net/note/delete/129773/non-english Del: in docs -- https://main.php.net/note/delete/129773/in+docs Del: other reasons-- https://main.php.net/note/delete/129773 Reject -- https://main.php.net/note/reject/129773 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#221556) next »