mirror of
https://github.com/getgrav/grav.git
synced 2026-07-10 19:03:29 +02:00
Fixed potential undefined property in onPageNotFound event handling
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
* Grav 1.6: Fixed `FlexObject::update()` removing fields on save
|
||||
* Fixed `mkdir(...)` race condition
|
||||
* Fixed `Obtaining write lock failed on file...`
|
||||
* Fixed potential undefined property in `onPageNotFound` event handling
|
||||
|
||||
# v1.6.0-rc.3
|
||||
## 02/18/2019
|
||||
|
||||
@@ -36,7 +36,9 @@ class PagesProcessor extends ProcessorBase
|
||||
|
||||
if (!$page->routable()) {
|
||||
// If no page found, fire event
|
||||
$event = $this->container->fireEvent('onPageNotFound', new Event(['page' => $page]));
|
||||
$event = new Event(['page' => $page]);
|
||||
$event->page = null;
|
||||
$event = $this->container->fireEvent('onPageNotFound', $event);
|
||||
|
||||
if (isset($event->page)) {
|
||||
unset ($this->container['page']);
|
||||
|
||||
Reference in New Issue
Block a user