php / php/pecl-mail-mailparse

Incorrect return type for mailparse_msg_extract_part function

Open Beginner friendly
#49 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
38
Forks
35
PR merge metrics
No merged PRs in 30d

Description

The mailparse_msg_extract_part has the following return type:

@return void

However, when passing a null value for the callbackfunc parameter, this function will return the content as a string.

In order to match this functionality and prevent errors in the IDE & static analyzers, the return type should be:

@return ?string

Contributor guide

No contributing guide indexed for this repository

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

Locate the declaration or documentation for mailparse_msg_extract_part and inspect its current @return annotation. Update the documented return type to match the null-callback behavior described in the issue, then verify that the function is represented as returning a nullable string for IDEs and static analyzers.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.