Page MenuHomePhorge

D25389.1734707130.diff
No OneTemporary

D25389.1734707130.diff

diff --git a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldDate.php b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldDate.php
--- a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldDate.php
+++ b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldDate.php
@@ -24,7 +24,7 @@
public function getValueForStorage() {
$value = $this->getFieldValue();
- if (strlen($value)) {
+ if (phutil_nonempty_string($value)) {
return (int)$value;
} else {
return null;
@@ -32,7 +32,7 @@
}
public function setValueFromStorage($value) {
- if (strlen($value)) {
+ if (phutil_nonempty_string($value)) {
$value = (int)$value;
} else {
$value = null;
@@ -74,7 +74,7 @@
// specify as a string. Parse the string into an epoch.
$value = $this->getFieldValue();
- if (!ctype_digit($value)) {
+ if ($value !== null && !ctype_digit($value)) {
$value = PhabricatorTime::parseLocalTime($value, $this->getViewer());
}

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 20, 15:05 (13 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1018921
Default Alt Text
D25389.1734707130.diff (1 KB)

Event Timeline