Bug #36380
closedt3lib_div::getUrl() with local file throws a warning while file does not exists
100%
Description
When using t3lib_div::getUrl() to get content of a file on the filesystem which does not exists, a php warning is issued.
excample calls:
t3lib_div::getUrl(t3lib_extMgm::extPath('myqxt').'ext_tables.sql');
t3lib_div::getUrl(t3lib_extMgm::extPath('myqxt').'templates\list.html');
This error occurs since verion 4.5.15 by fixing issue 35847.
In previous versions t3lib_div::getUrl() returns false, if the file does not exists.
Updated by Philipp Gampe over 12 years ago
I think this is a change in behavior which was not needed. I will push a fix.
Updated by Gerrit Code Review over 12 years 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/10659
Updated by Ingo Renner over 12 years ago
- Status changed from Under Review to Rejected
rengaw wrote:
When using t3lib_div::getUrl() to get content of a file on the filesystem which does not exists, a php warning is issued.
please use file_exists() http://de2.php.net/manual/en/function.file-exists.php
Updated by rengaw83 over 12 years ago
I can use is_readable befor i call getURL. But there are other extension in TER, wich use getURL without this check (for example phpunit). Becouse, it was not previously necessary.
The getURL call is unnecessary, when he does not handle the error. why the $report, when i has to use file_exists?
Updated by Gerrit Code Review over 12 years ago
- Status changed from Rejected to Under Review
Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/10854
Updated by Gerrit Code Review over 12 years ago
Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/10868
Updated by Philipp Gampe over 12 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 786281f2ceb25d2b84e485f8d32826cbfaef8e9f.
Updated by Gerrit Code Review over 12 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/13245
Updated by Wouter Wolters about 12 years ago
Please close this issue. All affected branches are up to date 4.5 and 4.6
Updated by Stefan Galinski about 12 years ago
- Status changed from Under Review to Closed