Actions
Bug #70374
closedfile_get_contents default context
Start date:
2015-10-05
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
7
PHP Version:
5.5
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Description
In our development environment we have to use a proxy to retrieve data from external web addresses. To do this we use 'stream_context_set_default' to set the proxy by default.
In TYPO3 version 7.5 in GeneralUtility::getUrl the context is set (line 2495) without checking a default.
The following code solve our problem:
$ctx = stream_context_create(array( 'http' => array( 'header' => implode(CRLF, $requestHeaders) ) )); $defaultCtx = stream_context_get_default(); if($defaultCtx) { $content = @file_get_contents($url); } else { $content = @file_get_contents($url, FALSE, $ctx); }
Updated by Gerrit Code Review about 9 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43810
Updated by Josef F. Glatz (Old User) about 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset b4813ddb55ab789ddd13e02234f147a44d2af1ed.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed
Actions