diff --git a/CHANGELOG.md b/CHANGELOG.md index e381e92..0f66a0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. This projec to [Semantic Versioning] (http://semver.org/). For change log format, use [Keep a Changelog] (http://keepachangelog.com/). +## [2.5.2] - 2024-12-04 + +### Fixed + +- Prevent unserialize with no options + ## [2.5.1] - 2024-12-03 ### Fixed diff --git a/src/Router.php b/src/Router.php index 89e2c10..355e84e 100644 --- a/src/Router.php +++ b/src/Router.php @@ -71,8 +71,8 @@ public function __serialize(): array */ public function __unserialize(array $data): void { - $this->options = $data['options']; - $this->routes = $data['routes']; + $this->options = $data['options'] ?? []; + $this->routes = $data['routes'] ?? []; } /**