HomePhabricator

Do not rely on array autocreation for custom User properties

Authored by Tgr on Jul 10 2019, 6:53 PM.

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

Details

Committed
TgrJul 10 2019, 6:54 PM
Parents
rEOAU348491a3cc99: Localisation updates from https://translatewiki.net.
Branches
Unknown
Tags
Unknown
ChangeId
I15090ae9e4b66ac25f631f6179c4394ce8c445a9