Hovercards: Avoid "Undefined index: objectPHID" when passing bogus data
Summary:
Do not throw an exception when passing bogus parameters to hovercards but properly handle the missing array index by setting $object_phid to null.
In consequence, see a proper hovercard correctly displaying Unknown Object (????) instead of an exception.
Closes T15969
Test Plan:
- Go to http://phorge.localhost/search/hovercard/?cards={"whatever":{"whatever":"foobar"}} or http://phorge.localhost/?__path__=%2fsearch%2fhovercard%2f&cards={%22whatever%22:{%22whatever%22:%22foobar%22}} and see a nice Unknown Object (????) instead of an ugly exception
- Go to http://phorge.localhost/search/hovercard/?cards={%22PHID-TASK-12345678%2F%22%3A{%22objectPHID%22%3A%22PHID-TASK-12345678%22%2C%22contextPHID%22%3Anull}} (make sure to use a valid task PHID) and still see a correct hovercard rendered
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15969
Differential Revision: https://we.phorge.it/D25849