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