Commit 668b413
fix(ui): Fix PHP warning for non-variables passed by reference (#1080)
* Fix notice about variables passed by reference
`reset` only takes variables so we can not pass the result of
`array_keys` directly but have to use an intermediate variable.
* Merge variable fallback expressions
`array_key_exists('schema', $input) ? $input['schema'] : NULL` is equal
to `$input['schema'] ?? NULL` on PHP versions that support the
null-coalescing operator. Since we already use this elsewhere we already
require such PHP versions.
This allows us to substitute the simplified one-use variable leading to
`$input['schema'] ?? NULL ?? $server->get('schema')`. The expression `??
NULL ??` can be safely transformed to `??` to result in the simplified
expression in this commit.
Co-authored-by: Klaus Purer <[email protected]>1 parent b235e07 commit 668b413
1 file changed
+4
-2
lines changed| 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 | + | |
| 98 | + | |
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
| |||
0 commit comments