WordPress / WordPress/Requests
fopen of stream handle should have a mode option
Open
Nobody has claimed this yet.
Focus: File handling
Type: enhancement
- Dominant language
- PHP
- Stars
- 3.6k
- Forks
- 500
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 5
Description
By setting option['filename'] it opens a file with 'wb' mode:
$this->stream_handle = fopen($options['filename'], 'wb');
but I need it to be 'a+'
Please add an option for that
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the stream-handle fopen call shown in the issue and trace how filename options are processed. Add a configurable mode for that open operation, preserving the current default, then verify behavior for the requested append/read mode and the existing write mode.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100