Project

General

Profile

Actions

Bug #36380

closed

t3lib_div::getUrl() with local file throws a warning while file does not exists

Added by rengaw83 over 12 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2012-04-20
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #35847: t3lib_div::getUrl() providing wrong error informationClosedIngo Renner2012-04-11

Actions
Related to TYPO3 Core - Bug #36976: PHP warning when a language pack does not existClosedXavier Perseguers2012-05-09

Actions
Actions #1

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.

Actions #2

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

Actions #3

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

Actions #4

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?

Actions #5

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

Actions #6

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

Actions #7

Updated by Philipp Gampe over 12 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #8

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

Actions #9

Updated by Wouter Wolters about 12 years ago

Please close this issue. All affected branches are up to date 4.5 and 4.6

Actions #10

Updated by Stefan Galinski about 12 years ago

  • Status changed from Under Review to Closed
Actions

Also available in: Atom PDF