Skip to content

Commit

Permalink
Merge 7530ba8 into f07cf7b
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfnl committed Feb 23, 2024
2 parents f07cf7b + 7530ba8 commit 1894431
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions phpunitpolyfills-autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static function load( $className ) {
if ( $className === 'Error' || $className === 'TypeError' ) {
$file = \realpath( __DIR__ . '/src/Exceptions/' . $className . '.php' );

if ( \file_exists( $file ) === true ) {
if ( \is_string( $file ) && \file_exists( $file ) === true ) {
require_once $file;
return true;
}
Expand Down Expand Up @@ -128,7 +128,7 @@ public static function load( $className ) {
default:
$file = \realpath( __DIR__ . '/src/' . \strtr( \substr( $className, 23 ), '\\', '/' ) . '.php' );

if ( \file_exists( $file ) === true ) {
if ( \is_string( $file ) && \file_exists( $file ) === true ) {
require_once $file;
return true;
}
Expand Down

0 comments on commit 1894431

Please sign in to comment.