1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 14:00:56 +01:00

Test 0 and "" cases in Project Icon Config

Summary: Better validation for setting a default image in project.icon

Test Plan: Test adding `"0"` and `""` as image options in project.icon, see error.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D18197
This commit is contained in:
Chad Little 2017-07-10 12:01:13 -07:00
parent 5f1a359a92
commit af71c990ee

View file

@ -262,7 +262,8 @@ final class PhabricatorProjectIconSet
$is_disabled = idx($value, 'disabled'); $is_disabled = idx($value, 'disabled');
if (idx($value, 'image')) { $image = idx($value, 'image');
if ($image !== null) {
$builtin = idx($value, 'image'); $builtin = idx($value, 'image');
$builtin_map = id(new PhabricatorFilesOnDiskBuiltinFile()) $builtin_map = id(new PhabricatorFilesOnDiskBuiltinFile())
->getProjectBuiltinFiles(); ->getProjectBuiltinFiles();