Bug #23994
closedIncorrect use of is_dir in class.tx_rtehtmlarea_clearrtecache.php
0%
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
Updated by Henrik Ziegenhain about 14 years ago
I can confirm this issue when Clearing RTE-Cache on current Trunk r9315
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?
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...
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).
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...
Updated by Stanislas Rolland about 14 years ago
Strange indeed. I will try to find why.