Mantis - Quercus
Viewing Issue Advanced Details
3990 minor always 04-10-10 09:13 05-23-10 06:02
Xr  
 
normal  
new 4.0.6  
open  
none    
none  
0003990: isset issues an E_NOTICE on unset variable
Hi,

The following code issues a notice in Quercus 4.0.6 (also tested in 4.0.3).

<?php
error_reporting(E_NOTICE);
var_dump(isset($foo));
?>

Such a notice is not shown using the regular PHP distribution. I believe this is the correct behavior: checking if a variable is set should not issue a warning of any kind if it's not set.

Note that Quercus returns the correct result (i.e. false).

Regards,
Xr

Notes
(0004606)
Chris Graham   
05-23-10 05:59   
This works fine in 4.0.7, so I think this bug can be closed :).

Evidence...

<?php
error_reporting(E_NOTICE);
isset($foo);
echo $bar;
?>

produces just...

Notice: $bar is an undefined variable
(0004607)
Chris Graham   
05-23-10 06:02   
Whoops, also...

<?php
error_reporting(E_NOTICE);
var_dump(isset($foo));
echo $bar;
?>

produces just...

bool(false) Notice: $bar is an undefined variable