You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix five real defects in helpers and console commands.
- BreadcrumbsHelper: a single-crumb trail (key 0) was never marked
active because `!$key` treated index 0 as falsy. Split the
"no match found" path (key stays null in `lastWithLink` mode
when no crumb has a URL) from the "match at index 0" path.
- FormHelper::control(): the `$this->templater()->push()` /
`pop()` pair was unbalanced under exceptions. Anything thrown
by the option mutators or the parent `control()` call leaked
the pushed state into subsequent controls. Wrapped the body in
`try/finally`.
- PaginatorHelper::first()/last(): the docblock advertises
`templates` as accepting an array or a file name, but
`_templateOptions()` unconditionally did array operations
(`+=`, key access) on it and crashed for string values. String
templates now pass through unchanged so the templater can
`load()` the file.
- InstallCommand::_runNPMInstall(): chdir'd into the plugin
directory and never restored the previous cwd. Any later
relative-path work in the same process resolved against the
wrong directory. Captured `getcwd()` and restore it in a
`finally` block.
- ModifyViewCommand::_modifyView(): re-running the command was
non-idempotent. The literal `str_replace` for the
`initialize()` body always matched on the second run too,
duplicating `parent::initialize();`. Added guards so each
transformation is skipped when its target marker is already
present; the command now correctly reports an error when no
effective change can be made.
Adds regression tests for each fix, including a paginator
template file fixture under `tests/test_app/config/`.
0 commit comments