Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: check if defined WRITEPATH exists #9317

Merged
merged 4 commits into from
Dec 12, 2024

Conversation

michalsn
Copy link
Member

Description
This PR adds a check that WRITEPATH is defined correctly.

Fixes: #9309

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

Copy link
Contributor

@neznaika0 neznaika0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do I need to use DS? Windows is not supported

system/Boot.php Outdated Show resolved Hide resolved
@michalsn
Copy link
Member Author

@neznaika0 realpath() handles directory separators automatically. You can use / in the code, even on Windows, as PHP converts it to \ where necessary.

@neznaika0
Copy link
Contributor

I know that the paths are right for the system. But for tests and other manipulations, this is a problem - different slashes

@kenjis kenjis added the bug Verified issues on the current code behavior or pull requests that will fix them label Dec 12, 2024
michalsn and others added 2 commits December 12, 2024 08:03
Co-authored-by: Pooya Parsa <pooya_parsa_dadashi@yahoo.com>
@michalsn michalsn merged commit 9bc61b3 into codeigniter4:develop Dec 12, 2024
41 checks passed
@michalsn
Copy link
Member Author

Thanks everyone!

@michalsn michalsn deleted the fix/check-writepath branch December 31, 2024 13:41
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: Inaccurate path resolution in Boot
5 participants