mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Fixed bug #74836 (isset on zero-prefixed numeric indexes in array broken)
This commit is contained in:
parent
02ef5d3803
commit
bfa24e3488
2
NEWS
2
NEWS
@ -11,6 +11,8 @@ PHP NEWS
|
||||
. Added object type annotation. (brzuchal)
|
||||
. Fixed bug #74815 (crash with a combination of INI entries at startup).
|
||||
(Anatol)
|
||||
. Fixed bug #74836 (isset on zero-prefixed numeric indexes in array broken).
|
||||
(Dmitry)
|
||||
|
||||
- CLI:
|
||||
. Fixed bug #74849 (Process is started as interactive shell in PhpStorm).
|
||||
|
33
Zend/tests/bug74836.phpt
Normal file
33
Zend/tests/bug74836.phpt
Normal file
@ -0,0 +1,33 @@
|
||||
--TEST--
|
||||
Bug #74836 (isset on zero-prefixed numeric indexes in array broken)
|
||||
--FILE--
|
||||
<?php
|
||||
$s = "1234567890a";
|
||||
$a[10] = "42";
|
||||
$i = "010";
|
||||
|
||||
var_dump($s["10"], isset($s["10"]));
|
||||
var_dump($s["010"], isset($s["010"]));
|
||||
var_dump($s[$i], isset($s[$i]));
|
||||
|
||||
var_dump($a["10"], isset($a["10"]));
|
||||
var_dump($a["010"], isset($a["010"]));
|
||||
var_dump($a[$i], isset($a[$i]));
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(1) "a"
|
||||
bool(true)
|
||||
string(1) "a"
|
||||
bool(true)
|
||||
string(1) "a"
|
||||
bool(true)
|
||||
string(2) "42"
|
||||
bool(true)
|
||||
|
||||
Notice: Undefined index: 010 in %s on line %d
|
||||
NULL
|
||||
bool(false)
|
||||
|
||||
Notice: Undefined index: 010 in %s on line %d
|
||||
NULL
|
||||
bool(false)
|
Loading…
Reference in New Issue
Block a user