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:
Chris Mellor
2026-11-27 11:45:37 +00:00
committed by GitHub
parent a6a919c32c
commit cf21b7cd64
4 changed files with 38 additions and 3 deletions
+1 -1
View File
@@ -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);
}