summaryrefslogtreecommitdiff
path: root/Zend/tests/bug54262.phpt
blob: 16933ca30069933b81f145f089c52cc38b1085c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--TEST--
Bug #54262 (Crash when assigning value to a dimension in a non-array)
--FILE--
<?php
$a = '0';
var_dump(isset($a['b']));
$simpleString = preg_match('//', '', $a->a);
$simpleString["wrong"] = "f";
echo "ok\n";
?>
--EXPECTF--
bool(false)

Warning: Attempt to modify property 'a' of non-object in %sbug54262.php on line 4

Warning: Cannot use a scalar value as an array in %sbug54262.php on line 5
ok