WordPress / WordPress/Requests

fopen of stream handle should have a mode option

Open
#84 5 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.