|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20353 Change of isset behaviour
Submitted: 2002-11-11 03:42 UTC Modified: 2002-11-11 10:23 UTC
From: bariou at brasnah dot com Assigned:
Status: Not a bug Package: Strings related
PHP Version: 4.3.0-pre2 OS: Red hat 7.2
Private report: No CVE-ID: None
 [2002-11-11 03:42 UTC] bariou at brasnah dot com
On 4.2.2 I've 

//some statements
// It comes here if $namevar is set, even if $namevar="";

On 4.3.0-pre2 I've 

//some statements
// It doesn't come if $namevar="";

You can't change that to much legacy....


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-11 03:46 UTC]
I can't reproduce this, works fine for me:

[derick@kossu derick]$ php
$foo = "";

if (isset($foo)) {
	echo "IN HERE!\n";
[derick@kossu derick]$ php -v
PHP 4.3.0-pre2 (cli)
Copyright (c) 1997-2002 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies
    with eXtended Debugger (xdebug) v1.1.0dev, Copyright (c) 2002 JDI Media Solutions, by Derick Rethans

Please post a full reproducing script that we can copy & paste, but keep it as small as possible.


 [2002-11-11 04:16 UTC] bariou at brasnah dot com
You are right,but there is a change.  I was not specific enough, in fact I send a variable through the get method


The test_isset.php file is :



    echo "it comes here even if the string is empty <BR>";

    echo "it comes here NAMEVAR is not set or is empty <BR>";

    echo "it comes here if set even if the string is empty <BR>";

    echo "it comes here NAME is not set <BR>";


With the previous http request :
For 4.3.0-pre2 bibi is never set

For 4.2.2 bibi is not set only when I remove = from the get URL, it seems logic

Idea ? Thanks
 [2002-11-11 04:20 UTC]
Please recompile and add the configure option --disable-mbstring. Does the problem still occur then?

 [2002-11-11 05:14 UTC] bariou at brasnah dot com

I've recompiled with --disable-mb_string. The behaviour, doesnot change.

I give you the ./configure directives from phpinfo() => 

'./configure' '--prefix=/usr/local/apache' '--with-apxs=/usr/local/apache/bin/apxs' '--with-config-file-path=/usr/local/apache/php' '--with-dom=/usr' '--enable-socket=shared' '--with-ttf' '--enable-inline-optimization' '-enable-magic-quotes' '--enable-trans-id' '--enable-bc-math' '--enable-memory-limit' '--enable-wddx' '--enable-sysvshm=shared' '--with-iconv=/usr/local' '--with-png-dir=/usr' '--with-jpeg-dir=/usr' '--with-tiff-dir=/usr' '--with-freetype-dir=/usr' '--with-zlib-dir=/usr' '--with-gd=/usr' '--enable-gd-native-ttf' '--with-mysql=/usr/local/mysql' '--enable-ftp' '--with-pdflib=/usr/local' '--with-xpm-dir=/usr/X11R6' '--enable-xslt' '--with-xslt-sablot=/usr/local' '--with-expat-dir=/usr' '--with-mnogosearch=/usr/local' '--with-mcrypt=/usr/local' '--with-zlib=/usr' '--with-xmlrpc' '--enable-libgcc' '--with-java=/usr/java/j2sdk1.4.1' '--with-tsrm-pth' '--disable-mbstring'

I solve the problem, on my side, through a dirty way (I check the presence of the varaible in the query string with an ereg :-( ). I think we must have the same it will be necessary to fix that. Feel free top ask me some other trials  

 [2002-11-11 10:06 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

 [2002-11-11 10:23 UTC] bariou at brasnah dot com
I don't understand, if this problem is not related to PHP I must have the same behaviour for different release . The behaviour is different for the 4.2.2 release and the 4.3.0 release, PHP doesn't process in the same way data from the GET method. 

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 23 15:01:28 2024 UTC