Bug #35847
t3lib_div::getUrl() providing wrong error information
| Status: | Resolved | Start date: | 2012-04-11 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | Ingo Renner | % Done: | 100% |
|
| Category: | - | |||
| Target version: | 6.0.0 | |||
| TYPO3 Version: | 4.5 | Complexity: | easy | |
| PHP Version: | ||||
| Votes: | 0 |
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
| related to Core - Bug #36976: PHP warning when a language pack does not exist | Under Review | 2012-05-09 | ||
| related to Core - Bug #36380: t3lib_div::getUrl() with local file throws a warning whil... | Closed | 2012-04-20 |
Associated revisions
[BUGFIX] t3lib_div::getUrl() providing wrong error information
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
Change-Id: I6bb9ad7010a633f259da103f71f404592194f743
Fixes: #35847
Releases: 6.0, 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/10229
Reviewed-by: Oliver Klee
Tested-by: Oliver Klee
Reviewed-by: Andy Grunwald
Tested-by: Andy Grunwald
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Ingo Renner
Tested-by: Ingo Renner
[BUGFIX] t3lib_div::getUrl() providing wrong error information
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
Change-Id: Icbd4ad779b1b12d226ffe2f78a344b72326603e8
Fixes: #35847
Releases: 6.0, 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/10254
Reviewed-by: Ingo Renner
Tested-by: Ingo Renner
[BUGFIX] t3lib_div::getUrl() providing wrong error information
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
Change-Id: Iddb421b53d20b03fed2fb765e5643d1e95e7da98
Fixes: #35847
Releases: 6.0, 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/10257
Reviewed-by: Ingo Renner
Tested-by: Ingo Renner
[BUGFIX] t3lib_div::getUrl() providing wrong error information
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
Change-Id: I8058db5d2a70a6d94b7c3c511e549cccc8079a2c
Fixes: #35847
Releases: 6.0, 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/10258
Reviewed-by: Ingo Renner
Tested-by: Ingo Renner
[BUGFIX] t3lib_div::getUrl() throws a warning on nonexisting local file
During #35847 the silent operator was removed from file_get_content()
which should not have happend.
Change-Id: Ifb12b5f5b20234f1a218c43d4f3882de16b7f0a0
Related: #35847
Fixes: #36380
Releases: 4.6, 4.5
Reviewed-on: http://review.typo3.org/10854
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] t3lib_div::getUrl() throws a warning on nonexisting local file
During #35847 the silent operator was removed from file_get_content()
which should not have happend.
Change-Id: Ifb12b5f5b20234f1a218c43d4f3882de16b7f0a0
Related: #35847
Fixes: #36380
Releases: 4.6, 4.5
Reviewed-on: http://review.typo3.org/10868
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
History
Updated by Ingo Renner about 1 year ago
- Subject changed from t3lib_div::getUrl() providing wrong error information with file/context to t3lib_div::getUrl() providing wrong error information
Updated by Gerrit Code Review about 1 year ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10229
Updated by Gerrit Code Review about 1 year ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10229
Updated by Gerrit Code Review about 1 year ago
Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10229
Updated by Gerrit Code Review about 1 year ago
Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/10254
Updated by Gerrit Code Review about 1 year ago
Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/10257
Updated by Gerrit Code Review about 1 year ago
Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/10258
Updated by Ingo Renner about 1 year ago
- Status changed from Under Review to Resolved
- Target version set to 6.0.0
Updated by Gerrit Code Review about 1 year ago
- Status changed from Resolved to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10302
Updated by Ingo Renner about 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 174d81fdffeffe47e0888527b8b8e5f7470e0e23.