Commit 23fd7fd
fix: guard STDIN reference for non-CLI invocations of AbstractCommand
Page-cache tests in CodeIgniterTest exercise command() from an HTTP
context where STDIN is not defined globally. Bare `STDIN` inside the
CodeIgniter\CLI namespace fails to resolve in that mode. Guard with
defined() and use \STDIN explicitly; a non-CLI caller cannot prompt,
so the correct semantic is non-interactive.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>1 parent a754da4 commit 23fd7fd
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
360 | 363 | | |
361 | 364 | | |
362 | 365 | | |
363 | 366 | | |
364 | 367 | | |
365 | 368 | | |
366 | | - | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
367 | 374 | | |
368 | 375 | | |
369 | 376 | | |
| |||
0 commit comments