Skip to content

Commit

Permalink
Go to end of exploded array instead
Browse files Browse the repository at this point in the history
  • Loading branch information
stickz committed Jan 10, 2022
1 parent d12228d commit d92e194
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions php/util.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
{
// Remove namespaces from the classname string
// Important for compatibility with 3rd party plugins
if (preg_match('@\\\\([\w]+)$@', $class, $matches)) {
$class = $matches[1];
}
$class = end(explode('\\',$class));

require_once 'utility/'. strtolower($class). '.php';
});
Expand Down

0 comments on commit d92e194

Please sign in to comment.