Yoast / Yoast/duplicate-post

Function name "__duplicate_post_main" is discouraged; PHP has reserved all method names with a double underscore prefix for future use

Open
#203 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
53
Forks
38
Avg merge
4d 8h
Merged PRs (30d)
1

Description

Hi,
I have executed a plug-in to check PHP compatibility and it report:
WARNING | Function name "__duplicate_post_main" is discouraged; PHP has reserved all method names with a double underscore prefix for future use.
in this file: https://github.com/Yoast/duplicate-post/blob/trunk/duplicate-post.php

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 in duplicate-post.php, where the reported __duplicate_post_main function is located, and inspect its definition and references. Rename it to avoid the reserved double-underscore prefix, then rerun the PHP compatibility check and confirm that the warning no longer appears.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.