File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,10 @@ func threadDebugState(thread *phpThread) ThreadDebugState {
6767 thread .handlerMu .RLock ()
6868 defer thread .handlerMu .RUnlock ()
6969
70+ if thread .handler == nil {
71+ return s
72+ }
73+
7074 fc := thread .handler .frankenPHPContext ()
7175 if fc == nil || fc .request == nil || fc .responseWriter == nil {
7276 return s
Original file line number Diff line number Diff line change @@ -127,10 +127,13 @@ func (thread *phpThread) context() context.Context {
127127
128128func (thread * phpThread ) name () string {
129129 thread .handlerMu .RLock ()
130- name := thread .handler .name ()
131- thread .handlerMu .RUnlock ()
130+ defer thread .handlerMu .RUnlock ()
132131
133- return name
132+ if thread .handler == nil {
133+ return "unknown"
134+ }
135+
136+ return thread .handler .name ()
134137}
135138
136139// Pin a string that is not null-terminated
You can’t perform that action at this time.
0 commit comments