Fixed bug: missing check for PHP version in t3lib_div::getUrl()
authorDmitry Dulepov <dmitry.dulepov@gmail.com>
Tue, 11 Jul 2006 10:27:18 +0000 (10:27 +0000)
committerDmitry Dulepov <dmitry.dulepov@gmail.com>
Tue, 11 Jul 2006 10:27:18 +0000 (10:27 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@1619 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_div.php

index 071507a..8012db0 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-07-10 Dmitry Dulepov <typo3@accio.lv>
+
+       * Fixed bug: missing check for PHP version in t3lib_div::getUrl()
+
 2006-07-10  Ernesto Baschny <ernst@cron-it.de>
 
        * Fixed bug #3005: captionSplit.cObject functionality in IMGTEXT is back as documented. But marked as "deprecated".
@@ -6,7 +10,7 @@
 
 2006-07-10 Dmitry Dulepov <typo3@accio.lv>
 
-       * Bug: "Publish time" label appeared where "Unpublish time" should appear
+       * Fixed bug: "Publish time" label appeared where "Unpublish time" should appear
 
 2006-07-07  Karsten Dambekalns  <karsten@typo3.org>
 
index a09b884..aee9e5c 100755 (executable)
@@ -2371,13 +2371,13 @@ class t3lib_div {
                                        )
                                );
 
-                       if (function_exists('file_get_contents'))       {
-                               $content = @file_get_contents($url, $ctx);
+                       if (function_exists('file_get_contents') && version_compare(phpversion(), '5.0', '>=')) {
+                               $content = @file_get_contents($url, false, $ctx);
                        }
                        elseif (false !== ($fd = @fopen($url, 'rb', false, $ctx)))      {
                                $content = '';
                                while (!feof($fd))      {
-                                       $content.= fread($fd, 4096);
+                                       $content .= fread($fd, 4096);
                                }
                                fclose($fd);
                        }
@@ -2388,7 +2388,7 @@ class t3lib_div {
                elseif (false !== ($fd = @fopen($url, 'rb')))   {
                        $content = '';
                        while (!feof($fd))      {
-                               $content.= fread($fd, 4096);
+                               $content .= fread($fd, 4096);
                        }
                        fclose($fd);
                }