1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00

Fix int fields for now

Summary: Fix T15516

Test Plan: Viewed an "int" custom field, no boom.

Reviewers: speck, valerio.bozzolan, O1 Blessed Committers

Reviewed By: valerio.bozzolan, O1 Blessed Committers

Subscribers: tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15516

Differential Revision: https://we.phorge.it/D25325
This commit is contained in:
Aviv Eyal 2023-07-03 13:46:25 -07:00
parent d725ffaa77
commit 603cf474ee

View file

@ -301,10 +301,14 @@ abstract class PhabricatorStandardCustomField
} }
public function renderPropertyViewValue(array $handles) { public function renderPropertyViewValue(array $handles) {
if (!phutil_nonempty_string($this->getFieldValue())) { // If your field needs to render anything more complicated then a string,
return null; // then you should override this method.
$value_str = phutil_string_cast($this->getFieldValue());
if (phutil_nonempty_string($value_str)) {
return $value_str;
} }
return $this->getFieldValue(); return null;
} }
public function shouldAppearInApplicationSearch() { public function shouldAppearInApplicationSearch() {