Page MenuHomePhabricator

Show "no badges" text in people profiles with archived badges only
ClosedPublic

Authored by lpriestley on Mar 28 2016, 6:12 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 25, 3:05 AM
Unknown Object (File)
Fri, Apr 19, 12:31 AM
Unknown Object (File)
Mon, Apr 15, 5:06 PM
Unknown Object (File)
Sat, Apr 6, 9:14 AM
Unknown Object (File)
Thu, Apr 4, 3:39 PM
Unknown Object (File)
Thu, Mar 28, 4:31 PM
Unknown Object (File)
Feb 11 2024, 8:12 PM
Unknown Object (File)
Feb 11 2024, 6:29 PM
Subscribers

Details

Summary

Fixes T10670, for users with exclusively archived badges, user profile should show "no badges" message instead of blank box

Test Plan

Award badge to user with no badges, archive badge, user profile should show "no badges" message under badges.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

lpriestley retitled this revision from to Show "no badges" text in people profiles with archived badges only.
lpriestley updated this object.
lpriestley edited the test plan for this revision. (Show Details)
lpriestley added a reviewer: epriestley.
epriestley edited edge metadata.
epriestley added inline comments.
src/applications/people/controller/PhabricatorPeopleProfileViewController.php
192

For consistency and robustness, consider $badges = array(); instead of $badges = null;, so that $badges always has the same type (an array) -- this mostly just makes it less likely that code later will get tripped up if it does something like You have count($badges) badges. or foreach ($badges as ...), which will work correctly if $badges is array() but not if it is null.

This revision is now accepted and ready to land.Mar 28 2016, 6:16 PM
lpriestley edited edge metadata.

empty $badges should be of type array

This revision was automatically updated to reflect the committed changes.