Project

General

Profile

Actions

Bug #35847

closed

t3lib_div::getUrl() providing wrong error information

Added by Ingo Renner over 12 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
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


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #36976: PHP warning when a language pack does not existClosedXavier Perseguers2012-05-09

Actions
Related to TYPO3 Core - Bug #36380: t3lib_div::getUrl() with local file throws a warning while file does not existsClosed2012-04-20

Actions
Actions

Also available in: Atom PDF