Skip to content

Commit

Permalink
fix: 🐛 Fix error applying format to "viewspath" empty
Browse files Browse the repository at this point in the history
  • Loading branch information
rguezque committed Oct 9, 2024
1 parent a03fce8 commit 08008ac
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Katya.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @method Route patch(string $path, callable $controller) Shortcut to add route with PATCH method
* @method Route delete(string $path, callable $controller) Shortcut to add route with DELETE method
* @method Group group(string $prefix, Closure $closure) Routes group definition under a common prefix
* @method Katya cors(array $allowed_origins) Set the allowed cross-origins resources sharing
* @method Katya setCors(CorsConfig $cors_config) Set the CORS configuration
* @method Katya setServices(Services $services) Set services to use into controllers
* @method Katya setVariables(Variables $vars) Set variables to use into controllers
* @method void run(Request $request) Start the router
Expand Down Expand Up @@ -117,7 +117,7 @@ class Katya {
*
* @var CorsConfig
*/
private $cors_config;
private $cors_config = null;

/**
* Configure the router options
Expand All @@ -134,7 +134,8 @@ public function __construct(array $options = []) {
$viewspath = isset($options['viewspath']) && is_string($options['viewspath'])
? add_trailing_slash(trim($options['viewspath']))
: '';
Globals::set('viewspath', add_trailing_slash(trim($viewspath)));

Globals::set('viewspath', $viewspath);
}

/**
Expand Down

0 comments on commit 08008ac

Please sign in to comment.