HomePhabricator

Do not rely on array autocreation for custom User properties

This commit no longer exists in the repository. It may have been part of a branch which was deleted.This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or ref.

Description

Do not rely on array autocreation for custom User properties

PHP allows autocreating arrays like

$o = (object)[];
$o->foo['x'] = 'y';

and it usually works for non-stdClass objects as well but
breaks when the object has a magic getter, so better to avoid it.

Bug: T227688
Change-Id: I15090ae9e4b66ac25f631f6179c4394ce8c445a9
(cherry picked from commit 1de417eb05f489e595d355ee625bf830eefe5ffe)

Details

Provenance
TgrAuthored on Jul 10 2019, 6:53 PM
Jdforrester-WMFCommitted on Jul 10 2019, 8:50 PM
ChangeId
I15090ae9e4b66ac25f631f6179c4394ce8c445a9

Commit No Longer Exists

This commit no longer exists in the repository.