Skip to content

Bug: showError in CLI/BaseCommand use hardcoded error view path - #6657

Merged
samsonasik merged 3 commits into
codeigniter4:developfrom
fpoy:BUG_hardcoded_error_view_path
Oct 10, 2022
Merged

Bug: showError in CLI/BaseCommand use hardcoded error view path#6657
samsonasik merged 3 commits into
codeigniter4:developfrom
fpoy:BUG_hardcoded_error_view_path

Conversation

@fpoy

@fpoy fpoy commented Oct 10, 2022

Copy link
Copy Markdown
Contributor

Fix #6656

Description

When you :

  • change the location of the views used to generate errors,
  • provide a new path in \Config\Exceptions::$errorViewPath,
  • and then run a CLI command generating an exception :

the error message is complaining about the location of the error_exception.php file... because the view path is hardcoded.

So instead of using a hardcoded directory for the error_exception.php file,

we should use the provided errorViewPath from \Config\Exceptions::$errorViewPath

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@MGatner

MGatner commented Oct 10, 2022

Copy link
Copy Markdown
Member

Nice catch! Please be sure to sign your commit - check the contributing guide for a step-by-step on how to apply that retroactively.

@kenjis kenjis added GPG-Signing needed Pull requests that need GPG-Signing bug Verified issues on the current code behavior or pull requests that will fix them labels Oct 10, 2022
@fpoy
fpoy force-pushed the BUG_hardcoded_error_view_path branch from 052e434 to 3d02abc Compare October 10, 2022 10:54
@fpoy

fpoy commented Oct 10, 2022

Copy link
Copy Markdown
Contributor Author

OK, the commit is finally securely signed

@kenjis kenjis removed the GPG-Signing needed Pull requests that need GPG-Signing label Oct 10, 2022
@samsonasik
samsonasik merged commit c7a47fa into codeigniter4:develop Oct 10, 2022
@samsonasik

Copy link
Copy Markdown
Member

Thank you @fpoy

@fpoy
fpoy deleted the BUG_hardcoded_error_view_path branch October 11, 2022 09:19
@fpoy
fpoy restored the BUG_hardcoded_error_view_path branch October 11, 2022 09:19
@fpoy
fpoy deleted the BUG_hardcoded_error_view_path branch October 11, 2022 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Verified issues on the current code behavior or pull requests that will fix them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: showError in CLI/BaseCommand use hardcoded error view path

4 participants