Actions
Bug #14438
closedt3lib_div::getURL() do not always return something
Start date:
2004-12-06
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
3.7.0
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
In t3lib/class.t3lib_div.php at line 2002, fopen() may fail.
In that case nothing is returned.
IMHO, return $content in if and elseif branch should be dropped and move just before end of function, so it will return an empty string when nothing was read (due to ie. failure of fopen()).
(issue imported from #M581)
Files
Updated by Wolfgang Klinger almost 20 years ago
I've provided a patch ---> see attached file
Updated by old_zas almost 20 years ago
This patch applies cleanly and is working, thanks.
Updated by Martin Kutschker almost 20 years ago
While we're at it, how about an enhancement? This might be faster for PHP 4.4 and above:
elseif (function_exists('file_get_contents') {
return file_get_contents($url);
}
Actions