#49606 [Opn->Fbk]: empty( $this->variable )

From: Date: Sun, 20 Sep 2009 17:23:19 +0000
Subject: #49606 [Opn->Fbk]: empty( $this->variable )
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-142597@lists.php.net to get a copy of this message
 ID:               49606
 Updated by:       jani@php.net
 Reported By:      clin dot isbut at gmail dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Scripting Engine problem
 Operating System: Windows Xp
 PHP Version:      5.3.0
 New Comment:

Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

Works fine for me..


Previous Comments:
------------------------------------------------------------------------

[2009-09-20 11:15:04] clin dot isbut at gmail dot com

Description:
------------
empty( $this->variable ) returns always true.


Reproduce code:
---------------
class FooClass
{
    var $publish;
    function foo()
    {
       $this->publish = '123456';
       if( empty( $this->publish ) )
           echo "publish is empty.";
       else
           echo "publish is NOT empty.";
    }
}

Expected result:
----------------
"publish is NOT empty."

Actual result:
--------------
"publish is empty."


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=49606&edit=1



Thread (8 messages)

« previous php.bugs (#142597) next »