Skip to content

Commit

Permalink
CreateSnapshotAdminExtension bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Rolland Csatari committed Aug 1, 2023
1 parent e690dbf commit d43d698
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/Admin/Extension/CreateSnapshotAdminExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ public function postPersist(AdminInterface $admin, object $object): void

public function postRemove(AdminInterface $admin, object $object): void
{
if ($object instanceof PageInterface) {
return;
}

$this->createByPage($object);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Route/RoutePageGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function update(SiteInterface $site, ?OutputInterface $output = null, boo
if (
!$this->decoratorStrategy->isRouteNameDecorable($name)
|| !$this->decoratorStrategy->isRouteUriDecorable($route->getPath())
|| (null !== $routeHostRegex
|| (is_string($routeHostRegex)
&& 0 === preg_match($routeHostRegex, $site->getHost() ?? ''))

Check failure on line 81 in src/Route/RoutePageGenerator.php

View workflow job for this annotation

GitHub Actions / Psalm

ArgumentTypeCoercion

src/Route/RoutePageGenerator.php:81:37: ArgumentTypeCoercion: Argument 1 of preg_match expects non-empty-string, but parent type string provided (see https://psalm.dev/193)
) {
if (null !== $page) {
Expand Down

0 comments on commit d43d698

Please sign in to comment.