Handle not existing creation date on note object
[grauphel.git] / 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
         ) {