Warning and Fatal error is thrown when code snippet "Manipulate the meta robots tag output" is used
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- php, wordpress
- Domain
- documentation
Research direction
Start with the linked “Manipulate the meta robots tag output” documentation snippet and reproduce its use in a theme’s functions.php. Trace the reported array_map() warning and TypeError, then update the documented snippet so the reported usage no longer produces those errors.
Written by the indexing model from the issue text.
Description
Fatal error and warning from the "Manipulate the meta robots tag output"
Please give us a description of the issue
If we add this code snippet on the functions.php file, we face warning and fatal error like below:
Warning: array_map(): Expected parameter 2 to be an array, null given in …… /wp-content/themes/twentytwenty/functions.php on line 1060
Fatal error: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array
- Dominant language
- JavaScript
- Stars
- 15
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
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.
More from Yoast/developer
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Typos Open
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
bug confirmed issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
open-webui/open-webui#30750 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Mend: dependency security vulnerability untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 70/100