Skip to content

Commit

Permalink
fix the autoload
Browse files Browse the repository at this point in the history
  • Loading branch information
dinhtungdu committed Jun 7, 2021
1 parent f00d73e commit 5772efc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ public function load_class( $class ) {

// work backwards through the namespace names of the fully-qualified
// class name to find a mapped file name
$pos = strrpos( $prefix, '\\' );
while ( false !== $pos ) {
while ( false !== $pos = strrpos( $prefix, '\\' ) ) { // phpcs:ignore WordPress.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition

// retain the trailing namespace separator in the prefix
$prefix = substr( $class, 0, $pos + 1 );
Expand Down

0 comments on commit 5772efc

Please sign in to comment.