PHP 4.0 Bug #3986: empty("0") returns true

From: Date: Thu, 30 Mar 2000 20:16:48 +0000
Subject: PHP 4.0 Bug #3986: empty("0") returns true
Groups: php.dev 
Request: Send a blank email to php-dev+get-17434@lists.php.net to get a copy of this message
From: joe@soundprint.org Operating system: linux 2.2.12 PHP version: 4.0 Latest CVS (30/03/2000) PHP Bug Type: Scripting Engine problem Bug description: empty("0") returns true We've got this little snippet here that in version 3 works properly, however in php4 it has a minor problem. For all $rIA1 values other than 0 it works fine, but when $rIA1==0, empty returns true. // $rIA1 is between 0 and 4 $rIA1=0; if (empty($rIA1)) { $filled = 0; echo "Please answer question: IA1 <br> "; } //Result Please answer the question: IA1

« previous php.dev (#17434) next »