We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0e17bd commit 0de0715Copy full SHA for 0de0715
src/PageRouter.php
@@ -18,6 +18,7 @@
18
use CodeIgniter\HTTP\Exceptions\BadRequestException;
19
use CodeIgniter\HTTP\ResponseInterface;
20
use CodeIgniter\Router\Router;
21
+use RuntimeException;
22
23
/**
24
* Page based router.
@@ -70,6 +71,10 @@ public function pageBasedRoute(string $uri)
70
71
// Set default page for root uri
72
if ($uri === '' || $uri === '0') {
73
$uri = config('App')->defaultPage ?? 'home';
74
+
75
+ if (! is_string($uri)) {
76
+ throw new RuntimeException('App Config defaultPage must be a string.');
77
+ }
78
}
79
80
// Set default variables
0 commit comments