check if file is_readable

thanks @akirk
This commit is contained in:
Matthias Pfefferle 2023-05-10 18:53:09 +02:00
parent 26a1dc9be5
commit baa8027e3f

View file

@ -74,7 +74,7 @@ spl_autoload_register(
$filename = 'class-' . strtr( $class, '_', '-' );
$file = $base_dir . $filename . '.php';
if ( file_exists( $file ) ) {
if ( file_exists( $file ) && is_readable( $file ) ) {
require_once $file;
}
}