panjiwa10028 / solr-php-client

Automatically exported from code.google.com/p/solr-php-client
Other
0 stars 0 forks source link

Undefined variable: http_response_header in Apache/Solr/Service.php on line 384 #40

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
There is a comment before this line that says http_response_header is set
by file_get_contents but there is no assignment to $http_response_header

If this value is needed it should be assigned. If this value is not needed
null should be used as parameter for the call.

Original issue reported on code.google.com by Wienc...@gmail.com on 18 Mar 2010 at 1:44

GoogleCodeExporter commented 8 years ago
read the documentation for the http URL wrapper at 
http://php.net/manual/en/wrappers.http.php

Just under the first example code block:

...the headers are stored in the $http_response_header variable. Since PHP 
4.3.0, the headers are available 
using stream_get_meta_data().

Since I'm not using fopen, I don't have a reference to the underlying stream 
file_get_contents is opening, 
however that variable still gets populated. Do a var dump to see for yourself :)

Original comment by donovan....@gmail.com on 18 Mar 2010 at 1:57

GoogleCodeExporter commented 8 years ago
Its just that you still get a warning when you run this code with all warnings
enabled. Is this a bug in php then?

Original comment by Wienc...@gmail.com on 18 Mar 2010 at 1:57

GoogleCodeExporter commented 8 years ago

Original comment by donovan....@gmail.com on 22 Mar 2010 at 11:03

GoogleCodeExporter commented 8 years ago
Committed in r32

Original comment by donovan....@gmail.com on 22 Mar 2010 at 11:07