Add exception chaining to DateFormField::saveValueFormat
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 8 Aug 2018 11:44:17 +0000 (13:44 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 8 Aug 2018 11:44:17 +0000 (13:44 +0200)
wcfsetup/install/files/lib/system/form/builder/field/DateFormField.class.php

index 858230e1f4c3471073352b10efa085cf5f8296fe..f73ff8c97edcf78885446914d556f2c6b3809207 100644 (file)
@@ -106,7 +106,7 @@ class DateFormField extends AbstractFormField {
                        \DateTime::createFromFormat($saveValueFormat, TIME_NOW);
                }
                catch (\Exception $e) {
-                       throw new \InvalidArgumentException("Invalid date time format '{$saveValueFormat}'.");
+                       throw new \InvalidArgumentException("Invalid date time format '{$saveValueFormat}'.", 0, $e);
                }
                
                $this->__saveValueFormat = $saveValueFormat;