[TYPO3-core] RFC: Enhancement to t3lib_extfilefunc
Martin Kutschker
martin.kutschker-n0spam at no5pam-blackbox.net
Tue Jun 27 22:36:45 CEST 2006
Karsten Dambekalns schrieb:
> Hi.
>
> Type: feature
> Branch: HEAD
>
> The attached patch does two things. First it adds one more log message in case
> no file was uploaded as expected.
>
> Secondly it adds a new member variable to track the last error message
> encountered. This is useful if you use the class in your own scripts and want
> to display the cause of an error to the user.
Please add braces. The final part is IMHO easily "lost" otherwise.
} else {
$this->writelog(1,2,106,'There was no file uploaded!','');
}
And isn't this
foreach($data as $value) {
$details = preg_replace('/%s/', $value, $details, 1);
}
the same as this?
vsprintf($details, $data);
If not you could still use str_replace rather than preg_replace. IMHO
it's a good habit to use a regexp only when it's needed.
Masi
More information about the TYPO3-team-core
mailing list