|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74344 isset() returns inncorect value
Submitted: 2017-03-30 15:55 UTC Modified: 2017-04-23 04:22 UTC
From: damianboni at gmail dot com Assigned:
Status: No Feedback Package: Scripting Engine problem
PHP Version: 7.0.15 OS: ubuntu 16.04.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
25 - 11 = ?
Subscribe to this entry?

 [2017-03-30 15:55 UTC] damianboni at gmail dot com
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:
$params['entry']['attributes'] = array(
    'enabled' => true


$whatIsGoingOn = $params['entry']['attributes']['enabled'];


var_dump(array_key_exists('enabled', $params['entry']['attributes']));


Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-03-30 16:04 UTC]
-Status: Open +Status: Feedback
 [2017-03-30 16:04 UTC]
Seems to working fine.

You tried with that *exact* script? Are you using any zend_extensions? Any difference with opcache enabled and disabled?
 [2017-03-30 16:07 UTC] 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:32 UTC] damianboni at gmail dot com
-Status: Feedback +Status: Open
 [2017-03-30 16:32 UTC] damianboni at gmail dot com
Issue occurs on version 7.0.8 , you're testing it on 5.6.X
 [2017-03-30 16:39 UTC]
-Status: Open +Status: Not a bug -PHP Version: 7.0.17 +PHP Version: 7.0.8
 [2017-03-30 16:39 UTC]
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.
 [2017-04-10 16:06 UTC] damianboni at gmail dot com
-PHP Version: 7.0.8 +PHP Version: 7.0.15
 [2017-04-10 16:06 UTC] damianboni at gmail dot com
Same issue experienced on Ubuntu 16.04 and PHP 7.0.15 and 7.1.3,
isset is returning false when checking on boolean, this is inncorect, isset should return true on boolean value.


string(4) "team"
 [2017-04-10 16:11 UTC]
-Status: Not a bug +Status: Feedback
 [2017-04-10 16:11 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

 [2017-04-23 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 22 12:01:30 2024 UTC