Fixed #65213 - cannot cast SplFileInfo to boolean