diff options
author | George Peter Banyard <girgias@php.net> | 2019-08-20 23:11:11 +0200 |
---|---|---|
committer | George Peter Banyard <girgias@php.net> | 2019-08-21 18:05:08 +0200 |
commit | 7c6acc2eefcaf1b3fd03b1730db84f1f58fffec6 (patch) | |
tree | e89168b31728b7594c3b867b4b39e0e3856d1d58 /ext/standard/tests/array/range_bug70239_3.phpt | |
parent | 5b8e12a99b5fd2a314b9b3e5bb97122464379c85 (diff) | |
download | php-git-7c6acc2eefcaf1b3fd03b1730db84f1f58fffec6.tar.gz |
Promote warnings to errors in range()
Diffstat (limited to 'ext/standard/tests/array/range_bug70239_3.phpt')
-rw-r--r-- | ext/standard/tests/array/range_bug70239_3.phpt | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/standard/tests/array/range_bug70239_3.phpt b/ext/standard/tests/array/range_bug70239_3.phpt index 8402870c82..e49267bfe3 100644 --- a/ext/standard/tests/array/range_bug70239_3.phpt +++ b/ext/standard/tests/array/range_bug70239_3.phpt @@ -2,10 +2,13 @@ Bug #70239 Creating a huge array doesn't result in exhausted, but segfault, var 4 --FILE-- <?php -var_dump(range(PHP_INT_MIN, 0)); +try { + var_dump(range(PHP_INT_MIN, 0)); +} catch (\Error $e) { + echo $e->getMessage() . "\n"; +} ?> ===DONE=== --EXPECTF-- -Warning: range(): The supplied range exceeds the maximum array size: start=-%d end=0 in %srange_bug70239_3.php on line %d -bool(false) +The supplied range exceeds the maximum array size: start=-%d end=0 ===DONE=== |