Bug #4762: while() exits when substr() returns 0

From: Date: Thu, 01 Jun 2000 17:57:24 +0000
Subject: Bug #4762: while() exits when substr() returns 0
Groups: php.dev 
Request: Send a blank email to php-dev+get-20000@lists.php.net to get a copy of this message
From: babbos@silom.delta.edu.gr Operating system: Win 98SE PHP version: 3.0.16 PHP Bug Type: Performance problem Bug description: while() exits when substr() returns 0 in a string check routin whitch checks the validity of characters entered in a POST field i used while () with substr(). If the string that substr() parses has 0 (zero) in it, while() exits while it should not. e.g. $i=0; while ($ch=substr($field_name,$i) { print"$ch"; $i++; } if $field_name has a 0 in it, while() exits while it should exit with another false signal other than 0 (null maybe?)

« previous php.dev (#20000) next »