mirror of
https://github.com/pestphp/pest.git
synced 2026-12-06 07:42:17 +01:00
fix(tia): report why an include failed as plain PHP does (#2082)
Co-authored-by: Punyapal Shah <mrpunyapal@gmail.com>
This commit is contained in:
@@ -314,7 +314,7 @@ final class ReadCapture
|
||||
*/
|
||||
private function openNatively(string $path, string $mode, int $options): mixed
|
||||
{
|
||||
return ($options & STREAM_REPORT_ERRORS) !== 0
|
||||
return ($options & (STREAM_REPORT_ERRORS | self::STREAM_OPEN_FOR_INCLUDE)) !== 0
|
||||
? fopen($path, $mode, ($options & STREAM_USE_PATH) !== 0, $this->context)
|
||||
: @fopen($path, $mode, ($options & STREAM_USE_PATH) !== 0, $this->context);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user