Repository navigation
Commit 621cd5c
committed
Error on invalid boolean values for
`filter_var()` with `FILTER_NULL_ON_FAILURE` returns null for an
unparseable value such as `--show-in-rest=bogus`. The guard then skipped
the comparison entirely, so the filter silently became a no-op and the
command listed every registered ability. Asking to filter and receiving
the full set back is worse than an error.
Extract the parsing into `parse_bool_filter()` and fail with a clear
message instead. `true`/`false`/`1`/`0`/`yes`/`no`, the bare flag, and
`--no-show-in-rest` all keep working as before.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0162D8GNP2TsQyHUQKNoQv3a--show-in-rest
1 parent d8dbe7f commit 621cd5c
2 files changed
Lines changed: 34 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
399 | 407 | | |
400 | 408 | | |
401 | 409 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
209 | | - | |
210 | | - | |
| 208 | + | |
| 209 | + | |
211 | 210 | | |
212 | 211 | | |
213 | 212 | | |
| |||
694 | 693 | | |
695 | 694 | | |
696 | 695 | | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
697 | 719 | | |
698 | 720 | | |
699 | 721 | | |
| |||
0 commit comments