Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002404 [Quercus] major always 02-06-08 06:13 02-06-08 22:20
Reporter lee_saferite View Status public  
Assigned To nam
Priority normal Resolution fixed  
Status closed   Product Version 3.1.5
Summary 0002404: array_key_exists does not work with ArrayObject
Description array_key_exists does not work correctly with ArrayObject variables but does work with normal array variables.
Additional Information Code:
$one = new ArrayObject();
$one['one'] = "one here";
$two = array();
$two['two'] = 2;

var_dump($one->offsetExists('one'));
var_dump(isset($one['one']));
var_dump(array_key_exists('one', $one));
var_dump($one->offsetExists('not_here'));
var_dump(isset($one['not_here']));
var_dump(array_key_exists('not_here', $one));

var_dump(isset($two['two']));
var_dump(array_key_exists('two', $two));
var_dump(isset($two['not_here']));
var_dump(array_key_exists('not_here', $two));

Expected Result:
bool(true)
bool(true)
bool(true)
bool(false)
bool(false)
bool(false)
bool(true)
bool(true)
bool(false)
bool(false)

Actual Result:
bool(true)
bool(true)
bool(false)
bool(false)
bool(false)
bool(false)
bool(true)
bool(true)
bool(false)
bool(false)
Attached Files

- Relationships

- Notes
(0002724)
lee_saferite
02-06-08 06:22

This issue is present in:

resin-pro-3.1.s080205
resin-pro-3.1.s080130
resin-pro-3.1.4a
 
(0002728)
nam
02-06-08 22:20

php/4a4r
 

- Issue History
Date Modified Username Field Change
02-06-08 06:13 lee_saferite New Issue
02-06-08 06:20 lee_saferite Issue Monitored: lee_saferite
02-06-08 06:22 lee_saferite Note Added: 0002724
02-06-08 22:20 nam Status new => assigned
02-06-08 22:20 nam Assigned To  => nam
02-06-08 22:20 nam Status assigned => closed
02-06-08 22:20 nam Note Added: 0002728
02-06-08 22:20 nam Resolution open => fixed
02-06-08 22:20 nam Fixed in Version  => 3.1.5


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
32 total queries executed.
27 unique queries executed.
Powered by Mantis Bugtracker