Skip to content

Commit af71c99

Browse files
author
Chad Little
committedJul 10, 2017
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
1 parent 5f1a359 commit af71c99

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/applications/project/icon/PhabricatorProjectIconSet.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,8 @@ public static function validateConfiguration($config) {
262262

263263
$is_disabled = idx($value, 'disabled');
264264

265-
if (idx($value, 'image')) {
265+
$image = idx($value, 'image');
266+
if ($image !== null) {
266267
$builtin = idx($value, 'image');
267268
$builtin_map = id(new PhabricatorFilesOnDiskBuiltinFile())
268269
->getProjectBuiltinFiles();

0 commit comments

Comments
 (0)
Failed to load comments.