php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77538 Including empty file results in stopping of script
Submitted: 2019-01-29 09:23 UTC Modified: -
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: bugs dot php dot net at sjappa dot nl Assigned:
Status: Open Package: *General Issues
PHP Version: 7.2.14 OS: Ubuntu 16.04.5 LTS
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bugs dot php dot net at sjappa dot nl
New email:
PHP Version: OS:

 

 [2019-01-29 09:23 UTC] bugs dot php dot net at sjappa dot nl
Description:
------------
When I include a file, with only the php's start-tag, nothing more, just '<?php', my script stops...

Test script:
---------------
File A:

<?php

print "Foo";
include "file B.php";
print "Bar";

File B:

<?php


Expected result:
----------------
When I include the empty file B in my file A, with a print before and after, I would expect the output to look like:

'FooBar'

Actual result:
--------------
Instead, the empty php-file won't be handled as php-file, but it will stop my script (file A) from executing, outputting only:

'Foo'

Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Jun 25 14:01:23 2021 UTC