Commit d76fc71
committed
fix(NavigationManager): do not warn when an unknown entry is requested
get() is declared to return ?array and all of its callers handle null -
the public page layout explicitly renders an empty app list when the
current app has no navigation entry. The lookup itself did not guard
against a missing key though, so every public page rendered by an app
that registers no navigation entry (typical for files integration apps
like drawio) logged a PHP warning per page view:
Undefined array key "drawio" at lib/private/NavigationManager.php#432
Returning null explicitly keeps the behaviour identical for every
caller - the expression already evaluated to null after the warning -
and removes the log noise.
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>1 parent e8afe36 commit d76fc71
2 files changed
Lines changed: 8 additions & 1 deletion
File tree
- lib/private
- tests/lib
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | | - | |
| 315 | + | |
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
174 | 181 | | |
175 | 182 | | |
176 | 183 | | |
| |||
0 commit comments