Project

General

Profile

Actions

Bug #23994

closed

Incorrect use of is_dir in class.tx_rtehtmlarea_clearrtecache.php

Added by Juergen Deisenroth about 14 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2010-11-09
Due date:
% Done:

0%

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

Description

tx_rtehtmlarea_clearrtecache::clearTempDir calls is_dir without path informations. The code

function clearTempDir() {
$tempPath = t3lib_div::resolveBackPath(PATH_typo3.'../typo3temp/rtehtmlarea/');
$handle=opendir($tempPath);
while ($data=readdir($handle)) {
if (!is_dir($data) && $data!="." && $data!="..") {
unlink($tempPath.$data);
}
}
closedir($handle);
}

should be changed to something like this

public static function clearTempDir() {
$tempPath = t3lib_div::resolveBackPath(PATH_typo3.'../typo3temp/rtehtmlarea/');
if (($handle=@opendir($tempPath)) !== false) {
while (($data=readdir($handle)) !== false) {
$tmpFile = $tempPath . $data;
if( is_file($tmpFile) ) unlink($tmpFile);
}
closedir($handle);
}
}

This minor bug is in htmlArea RTE Version 1.8.12 to 2.1.2 (TYPO3 4.3.8 to 4.4.5a3)
(issue imported from #M16314)


Files

Actions #1

Updated by Henrik Ziegenhain about 14 years ago

I can confirm this issue when Clearing RTE-Cache on current Trunk r9315

Actions #2

Updated by Stanislas Rolland about 14 years ago

Please test the attached patch.

Actions #3

Updated by Henrik Ziegenhain about 14 years ago

+1 for patch against trunk - There isn`t anymore an error after clearing RTE cache.

btw: RTE writes no "cleared the cache" into the log, missing feature?

btw2: it seems that some icons are mixed up, maybe this came with #0008349? Should I open another issue?

Actions #4

Updated by Stanislas Rolland about 14 years ago

btw: perhaps missing feature.

btw2: I noticed that sometimes after updating the skin, icons get mixed up. Only after uninstalling and re-intalling rtehtmlarea are the correctly presented. But I don't know why. 8349 does modify the skin...

Actions #5

Updated by Stanislas Rolland about 14 years ago

Committed to trunk (revision 9336), branch TYPO3_4-4 (revision 9337) and branch TYPO3_4-3 (revsion 9338).

Actions #6

Updated by Henrik Ziegenhain about 14 years ago

Thanks for your tip. Uninstalling and re-installing the RTE solved the problem with the mixed icons. Stange...

Actions #7

Updated by Stanislas Rolland about 14 years ago

Strange indeed. I will try to find why.

Actions #8

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF