Commit 7148bf9
authored
fix: move $instance creation before /stream route to fix non-static permission callback (#513)
check_chat_permission() is a non-static instance method but was being
called statically via [__CLASS__, 'check_chat_permission'], causing a
fatal TypeError on every chat request.
Move $instance = new self() before the /stream route registration and
use [$instance, 'check_chat_permission'] for the permission_callback.
The /run route reuses the same $instance (no duplicate instantiation).
Closes #5091 parent e922f79 commit 7148bf9
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
99 | | - | |
| 100 | + | |
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| |||
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
152 | | - | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| |||
0 commit comments