php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42992 headers_sent() gets crazy after calling empty files via virtual()
Submitted: 2007-10-16 14:22 UTC Modified: 2007-10-16 20:33 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (50.0%)
From: hamdi at rawasy dot com Assigned:
Status: Not a bug Package: Apache related
PHP Version: 4.4.7 OS: Irrelevant
Private report: No CVE-ID: None
 [2007-10-16 14:22 UTC] hamdi at rawasy dot com
Description:
------------
The virtual() function works great, but not headers_sent()!

headers_sent() returns true with an empty string as filename & indicates that the line number is zero!

Reproduce code:
---------------
<?php
virtual("empty.php");	// An empty file
var_dump(headers_sent($file, $line), $file, $line);
?>

Expected result:
----------------
bool(false)
string(0) ""
int(0)


Actual result:
--------------
bool(true)
string(0) ""
int(0)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-16 20:33 UTC] johannes@php.net
virtual() does an apache sub-request - PHP has no clue what happens inside there.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 18:01:31 2024 UTC