Bug #20853
closedsyslog for getFileName() returns empty String in some cases (useless log-info)
0%
Description
the variable $newFile is only filled in some cases (i.e. when the correspondending extension isn't loaded) and is useless for syslog or admPanel when it's empty.
concerned lines:
if (!strcmp(substr($file,0,4),'EXT:')) {
$newFile='';
list($extKey,$script)=explode('/',substr($file,4),2);
if ($extKey && t3lib_extMgm::isLoaded($extKey)) {
$extPath=t3lib_extMgm::extPath($extKey);
$newFile=substr($extPath,strlen(PATH_site)).$script;
}
if (!@is_file(PATH_site.$newFile)) {
if ($this->tt_track) $GLOBALS['TT']->setTSlogMessage('Extension media file "'.$newFile.'" was not found!',3);
return;
} else $file=$newFile;
}
Instead of
if ($this->tt_track) $GLOBALS['TT']->setTSlogMessage('Extension media file "'.$newFile.'" was not found!',3);
I propose to write
if ($this->tt_track) $GLOBALS['TT']->setTSlogMessage('Extension media file "'.$newFile.'" ('.$fileFromSetup.') was not found!',3);
or simply
if ($this->tt_track) $GLOBALS['TT']->setTSlogMessage('Extension media file "'.$fileFromSetup.'" was not found!',3);
There is only one line to change
(issue imported from #M11673)