Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/export/field/PhabricatorStringExportField.php
<?php | <?php | ||||
final class PhabricatorStringExportField | final class PhabricatorStringExportField | ||||
extends PhabricatorExportField { | extends PhabricatorExportField { | ||||
public function getNaturalValue($value) { | public function getNaturalValue($value) { | ||||
if ($value === null) { | if ($value === null) { | ||||
return $value; | return $value; | ||||
} | } | ||||
if (!strlen($value)) { | if (!phutil_nonempty_string($value)) { | ||||
return null; | return null; | ||||
} | } | ||||
return (string)$value; | return (string)$value; | ||||
} | } | ||||
} | } |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0