|
| 1 | +--TEST-- |
| 2 | +Test for bug #2381: Step debug evaluator crashes when using ::class to deference expression |
| 3 | +--SKIPIF-- |
| 4 | +<?php |
| 5 | +require __DIR__ . '/../utils.inc'; |
| 6 | +check_reqs('dbgp'); |
| 7 | +?> |
| 8 | +--FILE-- |
| 9 | +<?php |
| 10 | +require 'dbgp/dbgpclient.php'; |
| 11 | +$filename = dirname(__FILE__) . '/bug02381.inc'; |
| 12 | + |
| 13 | +$commands = array( |
| 14 | + 'step_into', |
| 15 | + 'breakpoint_set -t line -n 9', |
| 16 | + 'run', |
| 17 | + 'eval -- ' . base64_encode('$GLOBALS[\'IDE_EVAL_CACHE\'][\'fac1af2a-5e88-436b-87e6-8be95ef78d42\']=(isset($this,$this->a,$this->a[0]::class))?($this->a[0]::class):"IDE_EVAL_ERR"'), |
| 18 | + 'context_get', |
| 19 | + 'detach', |
| 20 | +); |
| 21 | + |
| 22 | +dbgpRunFile( $filename, $commands ); |
| 23 | +?> |
| 24 | +--EXPECTF-- |
| 25 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 26 | +<init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file://bug02381.inc" language="PHP" xdebug:language_version="" protocol_version="1.0" appid=""><engine version=""><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2099 by Derick Rethans]]></copyright></init> |
| 27 | + |
| 28 | +-> step_into -i 1 |
| 29 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 30 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="1" status="break" reason="ok"><xdebug:message filename="file://bug02381.inc" lineno="13"></xdebug:message></response> |
| 31 | + |
| 32 | +-> breakpoint_set -i 2 -t line -n 9 |
| 33 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 34 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="2" id="{{PID}}0001"></response> |
| 35 | + |
| 36 | +-> run -i 3 |
| 37 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 38 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="run" transaction_id="3" status="break" reason="ok"><xdebug:message filename="file://bug02381.inc" lineno="9"></xdebug:message></response> |
| 39 | + |
| 40 | +-> eval -i 4 -- JEdMT0JBTFNbJ0lERV9FVkFMX0NBQ0hFJ11bJ2ZhYzFhZjJhLTVlODgtNDM2Yi04N2U2LThiZTk1ZWY3OGQ0MiddPShpc3NldCgkdGhpcywkdGhpcy0+YSwkdGhpcy0+YVswXTo6Y2xhc3MpKT8oJHRoaXMtPmFbMF06OmNsYXNzKToiSURFX0VWQUxfRVJSIg== |
| 41 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 42 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="4" status="break" reason="ok"><error code="206"><message><![CDATA[error evaluating code]]></message></error></response> |
| 43 | + |
| 44 | +-> context_get -i 5 |
| 45 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 46 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="5" context="0"><property name="$this" fullname="$this" type="object" classname="T" children="1" numchildren="1" page="0" pagesize="32"><property name="a" fullname="$this->a" facet="public" type="array" children="1" numchildren="1"></property></property></response> |
| 47 | + |
| 48 | +-> detach -i 6 |
| 49 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 50 | +<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="detach" transaction_id="6" status="stopping" reason="ok"></response> |
0 commit comments