#20931 [NEW]: is_null ceases to function

From: Date: Wed, 11 Dec 2002 07:07:07 +0000
Subject: #20931 [NEW]: is_null ceases to function
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-27317@lists.php.net to get a copy of this message
From: gregaryh@juno.com Operating system: debian linux PHP version: 4.2.3 PHP Bug Type: Variables related Bug description: is_null ceases to function I recently compiled php 4.2.3 on my debian system under apache 2.0. I then uploaded a site that was developed on another machine running apache 1.3 and php 4.2.1. While testing the site i noticed something seemed wrong. Upon further investigation i found that the is_null function, which was working perfectly on the other system, seemed to be malfunctioning. for example: if (is_null($somevar)){ execute code A } code A would execute regardless of whether $somevar had a null value or not if i do the following: echo is_null($somevar) nothing was echoed to the screen, again regardless of the value of $somevar if i did the following however with $somevar set to null: if($somevar == null){ execute code A if(is_null($somevar)){ execute code b } } code A will execute but code B will not. the value of somevar is assigned by an html form sent using the POST method as this example illustrates: $somevar = $_POST['$formvar']; the purpose of the code is to check if a field was left blank. This code worked fine on the original server but failed to work when copied to the new server my configuration is as follows: ./configure' '--prefix=/usr/local/apache2/php' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-config-file-path=/etc' '--with-mysql' -- Edit bug report at http://bugs.php.net/?id=20931&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=20931&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=20931&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=20931&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=20931&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=20931&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=20931&r=support Expected behavior: http://bugs.php.net/fix.php?id=20931&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=20931&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=20931&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=20931&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20931&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=20931&r=dst IIS Stability: http://bugs.php.net/fix.php?id=20931&r=isapi

« previous php.bugs (#27317) next »