Bug #67695 [Fbk->NoF]: Notice error by echo $http_response_header

From: Date: Sun, 11 Jan 2015 04:22:18 +0000
Subject: Bug #67695 [Fbk->NoF]: Notice error by echo $http_response_header
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-189883@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67695&edit=1

 ID:               67695
 Updated by:       php-bugs@lists.php.net
 Reported by:      info at hollander-ict dot nl
 Summary:          Notice error by echo $http_response_header
-Status:           Feedback
+Status:           No Feedback
 Type:             Bug
 Package:          *General Issues
 Operating System: Windows 7 SP1 32Bit
 PHP Version:      Irrelevant
 Private report:   N

 New Comment:

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.


Previous Comments:
------------------------------------------------------------------------
[2014-12-28 23:02:30] kalle@php.net

Please provide a complete reproducable script, the actual notice you get, no silence operators etc
(@), maybe file_get_contents() failed for some reason before the HTTP request even was sent, as you
can read in the documentation $http_response_header is populated in the local scope and is an array,
you used it as a string, please make sure your code does not contain such errors before posting.

------------------------------------------------------------------------
[2014-07-28 09:26:25] info at hollander-ict dot nl

Description:
------------
I want to get the response headers, but I get a notice error.
I open the file with file_get_contents, but the $http_response_header is empty

Test script:
---------------
<?php
Class core {
var $error = FALSE;
	function call($string) {
		if (!file_exists($string)) {
		@file_get_contents($string);
			if ($http_response_header != "HTTP/1.1 200 OK") {
				return $error = $http_response_header;
			}
		} else {
			return header("Location:".$string);
		}
	}

?>

Expected result:
----------------
I expect a http_responde, like HTTP/1.1 200 OK

Actual result:
--------------
A Notice error when I echo the HTTP/1.1 200 OK


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=67695&edit=1


Thread (3 messages)

« previous php.bugs (#189883) next »