mirror of
https://github.com/php/php-src.git
synced 2026-03-26 17:22:15 +01:00
If you were to enter "w $>" the function would crash with a segmentation fault because last_index is still NULL at that point. Fix it by checking for NULL and erroring out if it is. Closes GH-10353 Signed-off-by: George Peter Banyard <girgias@php.net>
26 lines
372 B
PHP
26 lines
372 B
PHP
--TEST--
|
|
Test malformed watchpoint name
|
|
--INI--
|
|
opcache.optimization_level=0
|
|
--PHPDBG--
|
|
b test
|
|
r
|
|
w $>
|
|
q
|
|
--EXPECTF--
|
|
[Successful compilation of %s]
|
|
prompt> [Breakpoint #0 added at test]
|
|
prompt> [Breakpoint #0 in test() at %s:%d, hits: 1]
|
|
>00004: }
|
|
00005: test();
|
|
00006: $a = 2;
|
|
prompt> [Malformed input]
|
|
prompt>
|
|
--FILE--
|
|
<?php
|
|
$a = 1;
|
|
function test() {
|
|
}
|
|
test();
|
|
$a = 2;
|