[TYPO3-core] Error in your Patch: 404_v3c.txt

Dmitry Dulepov typo3 at accio.lv
Tue Jul 11 10:31:48 CEST 2006


I am looking to description of fopen (just to check everything once 
more) and it says "Context support was added with PHP 5.0.0.". 
Interestingly, fopen does not complain about context parameter in php 
4.4.2 though file_get_contents does.

What do we do? Should we move PHP version check to upper "if", where we 
check for presence of "stream_context_create" or use Martin's version?


Martin Kutschker wrote:
> Ernesto Baschny [cron IT] schrieb:
>> Dmitry Dulepov schrieb am 10.07.2006 16:20:
>>> Yes, error exists but correct patch would be as in the attached file.
>>> $ctx have to be used in that place, it only should be preceeded by one
>>> 'false' parameter.
>>> I am sending this message to typo3 core team as well. Hopefully patch
>>> will be approved, this is easy-to-check fix (just by php documentation).
>> I read in the php-documentation the the third parameter (context) was
>> added in PHP 5.0. So this means the function call will return an empty
>> content if called in PHP 4.3.x.
> You're right. My last patch took care of that but Dmitry worked on his 
> copy and I forgot about it:
> if (function_exists('file_get_contents') &&
>     version_compare(phpversion(), '5.0', '>=')) {
>   $content = @file_get_contents($url, false, $ctx);
> }
> Sorry,
> Masi

"It is our choices, that show what we truly are,
far more than our abilities." (A.P.W.B.D.)

More information about the TYPO3-team-core mailing list