Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Jun 27, 2023
1 parent 35b1012 commit 9ff372e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions form.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,7 @@ public function onPageInitialized(): void
$page = $this->grav['page'];


// Force rebuild form when form has not been built and form cache expired.
// This happens when form cache expires before the page cache
// and then does not trigger 'onPageProcessed' event.
// DEPRECATED: This should no longer ever happen
if (!$this->forms) {
$this->onPageProcessed(new Event(['page' => $page]));
}
Expand Down Expand Up @@ -1253,7 +1251,7 @@ protected function loadCachedForms(): void

// Only update the forms if it's not empty
if ($forms) {
$this->forms = array_merge($this->forms, $forms);
$this->forms = Utils::arrayMergeRecursiveUnique($this->forms, $forms);
if ($this->config()['debug']) {
$this->grav['log']->addDebug(sprintf("<<<< Loaded cached forms: %s\n%s", $this->getFormCacheId(), $this->arrayToString($this->forms)));
}
Expand Down

0 comments on commit 9ff372e

Please sign in to comment.