Optimizations

This commit is contained in:
Andy Miller
2018-09-07 16:23:56 -06:00
parent bea7b1bea3
commit 4b971e871f
2 changed files with 5 additions and 5 deletions

View File

@@ -600,11 +600,11 @@ class Admin
// Check to see if a data type is plugin-provided, before looking into core ones
$event = $this->grav->fireEvent('onAdminData', new Event(['type' => &$type]));
if ($event && isset($event['data_type'])) {
if (is_string($event['data_type'])) {
$type = $event['data_type'];
} else {
if ($event) {
if (isset($event['data_type'])) {
return $event['data_type'];
} elseif (is_string($event['type'])) {
$type = $event['type'];
}
}