]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Tools/PageContent.php
Queries: Addressed failing test cases from recent changes
[bookstack] / app / Entities / Tools / PageContent.php
index 88987f054e86685e9576920f2bb4a7e33c92dbb9..4f68b828fc56e794bfd196535e338d3632df4d98 100644 (file)
@@ -329,13 +329,14 @@ class PageContent
     protected function getContentProviderClosure(bool $blankIncludes): Closure
     {
         $contextPage = $this->page;
+        $queries = $this->pageQueries;
 
-        return function (PageIncludeTag $tag) use ($blankIncludes, $contextPage): PageIncludeContent {
+        return function (PageIncludeTag $tag) use ($blankIncludes, $contextPage, $queries): PageIncludeContent {
             if ($blankIncludes) {
                 return PageIncludeContent::fromHtmlAndTag('', $tag);
             }
 
-            $matchedPage = $this->pageQueries->findVisibleById($tag->getPageId());
+            $matchedPage = $queries->findVisibleById($tag->getPageId());
             $content = PageIncludeContent::fromHtmlAndTag($matchedPage->html ?? '', $tag);
 
             if (Theme::hasListeners(ThemeEvents::PAGE_INCLUDE_PARSE)) {