Skip to content

Commit bcea503

Browse files
committed
Cast baseUrl to string before untrailing slash in BlockEditor, E2e, and Logging modules
Signed-off-by: Guido Scialfa <dev@guidoscialfa.com>
1 parent 8eae11a commit bcea503

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

sources/server/src/Modules/BlockEditor/Module.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function run(Container\ContainerInterface $container): bool
2929
$properties = $container->get(Modularity\Package::PROPERTIES);
3030

3131
$baseDir = \untrailingslashit($properties->basePath());
32-
$baseUrl = \untrailingslashit($properties->baseUrl());
32+
$baseUrl = \untrailingslashit((string)$properties->baseUrl());
3333

3434
/**
3535
* @var array{dependencies?: array<string>, version?: string} $asset

sources/server/src/Modules/E2e/Module.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function run(Container\ContainerInterface $container): bool
7676

7777
private static function postTypesExample(Modularity\Properties\Properties $properties): void
7878
{
79-
$baseUrl = \untrailingslashit($properties->baseUrl());
79+
$baseUrl = \untrailingslashit((string)$properties->baseUrl());
8080

8181
\wp_register_script(
8282
'kensaku-e2e-post-types-example-block',

sources/server/src/Modules/Logging/Module.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function run(Container\ContainerInterface $container): bool
3333
$properties = $container->get(Modularity\Package::PROPERTIES);
3434

3535
$baseDir = \untrailingslashit($properties->basePath());
36-
$baseUrl = \untrailingslashit($properties->baseUrl());
36+
$baseUrl = \untrailingslashit((string)$properties->baseUrl());
3737

3838
/**
3939
* @var array{dependencies?: array<string>, version?: string} $asset

0 commit comments

Comments
 (0)