[PHP-DEV] PHP 4.0 Bug #3986: empty("0") returns true From: joe <email protected>
Date: 03/30/00

From: joe <email protected>
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

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>