Skip to content

Commit

Permalink
fix: warning on alfred() calls with integers
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardBaumrock committed Jan 23, 2023
1 parent f918c5f commit d8f7122
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions RockFrontend.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public static function getModuleInfo()
{
return [
'title' => 'RockFrontend',
'version' => '2.16.1',
'version' => '2.16.2',
'summary' => 'Module for easy frontend development',
'autoload' => true,
'singular' => true,
Expand Down Expand Up @@ -429,9 +429,10 @@ public function alfred($page = null, $options = [])
$this->hasAlfred = true;

// set the page to be edited
$page = ($page and $page->id)
? $this->wire->pages->get((string)$page)
: false;
$p = false;
if ($page) $p = $this->wire->pages->get((string)$page);
if (!$p->id) $p = false;
$page = $p;

// check if the current page is a RPB block
// that can happen if RPB blocks are used as regular pages (nfkinder)
Expand Down

0 comments on commit d8f7122

Please sign in to comment.