Edit report at https://bugs.php.net/bug.php?id=74344&edit=1
ID: 74344
Updated by: [email protected]
Reported by: damianboni at gmail dot com
Summary: isset() returns inncorect value
-Status: Open
+Status: Not a bug
Type: Bug
Package: Scripting Engine problem
Operating System: ubuntu 16.04.3
-PHP Version: 7.0.17
+PHP Version: 7.0.8
Block user comment: N
Private report: N
New Comment:
No, that link tests all recent versions of PHP. Read the page.
If it works in all versions except 7.0.8 then there's nothing to do because that's an old version and we're on 7.0.17 now. Can't go back in time.
Though I still doubt this problem actually exists.
Previous Comments:
------------------------------------------------------------------------
[2017-03-30 16:32:38] damianboni at gmail dot com
Issue occurs on version 7.0.8 , you're testing it on 5.6.X
------------------------------------------------------------------------
[2017-03-30 16:07:08] spam2 at rhsoft dot net
> always get true with an exception to 7.0.8
reported for PHP Version: 7.0.17
so what does that mean?
"I tested the below script on different version of PHP and always get true with an exception to 7.0.8" - m yunderstanding is that this only happens on the Ubuntu build, not with a recent PHP release and so is not a current upstream pug?
------------------------------------------------------------------------
[2017-03-30 16:04:33] [email protected]
Seems to working fine. https://3v4l.org/uKiR6
You tried with that *exact* script? Are you using any zend_extensions? Any difference with opcache enabled and disabled?
------------------------------------------------------------------------
[2017-03-30 15:55:22] damianboni at gmail dot com
Description:
------------
Tested on PHP7.0.8 ubuntu 16.04.3 @ 2017-03-30
isset() is incorrectly retuning false (should return true) when checking array key that has its value set to boolean.
I tested the below script on different version of PHP and always get true with an exception to 7.0.8
Test script:
---------------
Code:
$params['entry']['attributes'] = array(
'enabled' => true
);
var_dump(isset($params['entry']['attributes']['enabled']));
$whatIsGoingOn = $params['entry']['attributes']['enabled'];
var_dump(isset($whatIsGoingOn));
var_dump(array_key_exists('enabled', $params['entry']['attributes']));
Output:
bool(false)
bool(true)
bool(true)
Expected result:
----------------
bool(true)
bool(true)
bool(true)
Actual result:
--------------
bool(false)
bool(true)
bool(true)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74344&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.