Handle not existing creation date on note object
authorChristian Weiske <cweiske@cweiske.de>
Thu, 7 Jul 2016 15:40:43 +0000 (17:40 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Thu, 7 Jul 2016 15:40:43 +0000 (17:40 +0200)
lib/notestorage.php

index 2ae9fcb..275374c 100644 (file)
@@ -120,6 +120,11 @@ class NoteStorage
             $note->{'last-metadata-change-date'} = date('c');
         }
 
+        if (!isset($note->{'create-date'})) {
+            //no idea how to get the microseconds in there
+            $note->{'create-date'} = date('c');
+        }
+
         if (isset($noteUpdate->{'node-content'})
             && $note->{'note-content-version'} == 0
         ) {