Page MenuHomePhabricator

HTMLFormFieldClone::getInputHTMLForKey is invoked with false $values parameter, array expected
Closed, ResolvedPublicPRODUCTION ERROR

Description

Invalid operand type was used: array_key_exists expects an array or an object; false returned.
in /srv/mediawiki/php-1.28.0-wmf.14/includes/htmlform/fields/HTMLFormFieldCloner.php on line 274

https://github.com/wikimedia/mediawiki/blame/wmf/1.28.0-wmf.14/includes/htmlform/fields/HTMLFormFieldCloner.php#L274

Method HTMLFormFieldClone::getInputHTMLForKey expect $values to be an array, not false value.

See also ed12473b15.

Event Timeline

Dereckson updated the task description. (Show Details)
Dereckson added a subscriber: Anomie.

Per the phpdoc $values must be an array, so the error is somewhere further down the call stack.

We don't currently have a stack trace.

Where does the error come from? I can't find it in logstash.

Change 304820 had a related patch set uploaded (by Anomie):
HTMLFormFieldCloner: Pass enpty array, not null, to avoid warning

https://gerrit.wikimedia.org/r/304820

Change 304820 merged by jenkins-bot:
HTMLFormFieldCloner: Pass enpty array, not null, to avoid warning

https://gerrit.wikimedia.org/r/304820

Change 304829 had a related patch set uploaded (by Florianschmidtwelzow):
Type hint array for HTMLFormFieldCloner::getInputHTMLForKey()

https://gerrit.wikimedia.org/r/304829

matmarex assigned this task to Anomie.
matmarex removed a project: Patch-For-Review.
matmarex subscribed.

Looks fixed, no recent hits in logstash.

Change 304829 merged by jenkins-bot:
Type hint array for HTMLFormFieldCloner::getInputHTMLForKey()

https://gerrit.wikimedia.org/r/304829

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:11 PM