Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F871848
D46.id118.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, May 8, 3:53 AM
Size
599 B
Mime Type
text/x-diff
Expires
Fri, May 9, 3:53 AM (17 h, 38 m)
Engine
blob
Format
Raw Data
Handle
617710
Attached To
D46: INP-1411 - Store empty value in form field as-as
D46.id118.diff
View Options
Index: core/kernel/utility/formatters/formatter.php
===================================================================
--- core/kernel/utility/formatters/formatter.php
+++ core/kernel/utility/formatters/formatter.php
@@ -209,11 +209,12 @@
*/
public function Parse($value, $field_name, &$object)
{
+ $options = $object->GetFieldOptions($field_name);
+
if ($value == '') {
- return NULL;
+ return $options['type'] == 'string' ? $value : null;
}
- $options = $object->GetFieldOptions($field_name);
$tc_value = $this->TypeCast($value, $options);
if ($tc_value === false) {
Event Timeline
Log In to Comment