Actions
Bug #35847
closedt3lib_div::getUrl() providing wrong error information
Start date:
2012-04-11
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:
Description
When using t3lib_div::getUrl() with lib file/context it uses file_get_contents() to read a URL. When this fails it tries to provide the reason for the error but does not return the actual issue.
The error key in the returned array contains the error retrieved by error_get_last() which does not provide the error that occurred with file_get_contents(), but with PHP. Usually this is a notice.
The actual error message of file_get_contents() is in the variable $http_response_header which is available after calling file_get_contents().
See http://de2.php.net/manual/en/reserved.variables.httpresponseheader.php
Actions