mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-06 05:05:31 +02:00
Fixed potential undefined property in onPageNotFound event handling
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
1. [](#bugfix)
|
||||
* Incorrect 2FA lang code [#1618](https://github.com/getgrav/grav-plugin-admin/issues/1618)
|
||||
* Fixed potential undefined property in `onPageNotFound` event handling
|
||||
|
||||
# v1.9.0-rc.3
|
||||
## 02/18/2019
|
||||
|
||||
@@ -499,7 +499,9 @@ class AdminPlugin extends Plugin
|
||||
|
||||
if (empty($this->grav['page'])) {
|
||||
if ($this->grav['user']->authenticated) {
|
||||
$event = $this->grav->fireEvent('onPageNotFound');
|
||||
$event = new Event(['page' => null]);
|
||||
$event->page = null;
|
||||
$event = $this->grav->fireEvent('onPageNotFound', $event);
|
||||
/** @var Page $page */
|
||||
$page = $event->page;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user