]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Repos/PageRepo.php
Extend /users API endpoint
[bookstack] / app / Entities / Repos / PageRepo.php
index bc6476824bee48932325e214c00c1486fa2ea981..6a4eaeb1553f834ccafdd3e6b642d160e96d81d3 100644 (file)
@@ -190,11 +190,11 @@ class PageRepo
         $this->getUserDraftQuery($page)->delete();
 
         // Save a revision after updating
-        $summary = $input['summary'] ?? null;
+        $summary = trim($input['summary'] ?? "");
         $htmlChanged = isset($input['html']) && $input['html'] !== $oldHtml;
         $nameChanged = isset($input['name']) && $input['name'] !== $oldName;
         $markdownChanged = isset($input['markdown']) && $input['markdown'] !== $oldMarkdown;
-        if ($htmlChanged || $nameChanged || $markdownChanged || $summary !== null) {
+        if ($htmlChanged || $nameChanged || $markdownChanged || $summary) {
             $this->savePageRevision($page, $summary);
         }