Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Code isn't using PHP's default argument values... am I missing something?
Proposed resolution
Let use PHP's default argument values.
Remaining tasks
Review patch.
Comment | File | Size | Author |
---|---|---|---|
#9 | metatag-n2001178-9.patch | 705 bytes | DamienMcKenna |
Comments
Comment #1
jantoine CreditAttribution: jantoine commentedPatch attached!
Comment #2
DamienMcKennaThe reason for this is to cover for when the language string is passed in as an empty string, Metatag doesn't like that so changes it to LANGUAGE_NONE.
Comment #3
jantoine CreditAttribution: jantoine commentedThis seems like a case where we should be validating the language in all cases, not just if an empty string is passed in. What happens if someone passes in a language that doesn't exist or is not enabled in Drupal?
Comment #4
DamienMcKennaYou have a reasonable point, we'll see what we can do about improving the language validation.
Comment #5
DamienMcKennaWhat do you think of this?
Comment #6
DamienMcKennaRerolled.
Comment #7
DamienMcKennaI accidentally included code from another patch in #6.
Comment #8
DamienMcKennaRerolled.
Comment #9
DamienMcKennaOops, the formatting was off.
Comment #10
DamienMcKennaCommitted. Thanks.