Page MenuHomePhorge

D25875.1740058779.diff
No OneTemporary

D25875.1740058779.diff

diff --git a/src/view/form/control/AphrontFormDateControlValue.php b/src/view/form/control/AphrontFormDateControlValue.php
--- a/src/view/form/control/AphrontFormDateControlValue.php
+++ b/src/view/form/control/AphrontFormDateControlValue.php
@@ -329,13 +329,16 @@
// If this looks like an epoch timestamp, prefix it with "@" so that
// DateTime() reads it as one. Assume small numbers are a "Ymd" digit
// string instead of an epoch timestamp for a time in 1970.
- if (ctype_digit($date) && ($date > 30000000)) {
- $date = '@'.$date;
+ if ($date) {
+ if (ctype_digit($date) && ($date > 30000000)) {
+ $date = '@'.$date;
+ }
+
+ $separator = $this->getFormatSeparator();
+ $parts = preg_split('@[,./:-]@', $date);
+ return implode($separator, $parts);
}
-
- $separator = $this->getFormatSeparator();
- $parts = preg_split('@[,./:-]@', $date);
- return implode($separator, $parts);
+ return null;
}
private function getStandardTimeFormat($time) {

File Metadata

Mime Type
text/plain
Expires
Thu, Feb 20, 13:39 (1 d, 42 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1173786
Default Alt Text
D25875.1740058779.diff (1 KB)

Event Timeline