Skip to content

Commit

Permalink
FIX: Avoid passing non-class to get_parent_class()
Browse files Browse the repository at this point in the history
Throws errors in PHP 8
  • Loading branch information
Sam Minnee authored and Garion Herman committed Sep 15, 2020
1 parent 5cb3d07 commit 09fb33e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Core/Config/Middleware/InheritanceMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public function getClassConfig($class, $excludeMiddleware, $next)
return $config;
}

// Skip if no parent class
$parent = get_parent_class($class);
// Skip if not a class or not parent class
$parent = class_exists($class) ? get_parent_class($class) : null;
if (!$parent) {
return $config;
}
Expand Down

0 comments on commit 09fb33e

Please sign in to comment.