Handle not existing creation date on note object
[grauphel.git] / lib / notestorage.php
index 2ae9fcb405702a9728f63488b268fe5933ae56c2..275374c4ed7f36348cb11c7328cad93fdb1994eb 100644 (file)
@@ -120,6 +120,11 @@ class NoteStorage
             $note->{'last-metadata-change-date'} = date('c');
         }
 
             $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
         ) {
         if (isset($noteUpdate->{'node-content'})
             && $note->{'note-content-version'} == 0
         ) {