[TYPO3-core] RFC: #16134: TYPO3 doesn't always fix permissions for new files
Oliver Klee
typo3-german-02 at oliverklee.de
Fri Dec 17 12:05:47 CET 2010
Hi,
some comments after reading and testing:
1. I get some skipped tests because I the tests don't find the clear.*
files:
$fixtureGifFile = PATH_site . 'tests/t3lib/fixtures/clear.gif';
if (!@is_file($fixtureGifFile)) {
$this->markTestSkipped('imagemakeFixesPermissionsOnNewFiles() test
skipped, clear.png fixture not found.');
}
This is because I'm working on Linux and using the typo3_src/ symlink,
not a tests/ symlink in the document root.
The phpunit test runner looks in both PATH_site . 'tests/ as well as in
PATH_site . 'typo3_src/tests/':
$coreTestsDirectory = file_exists(PATH_site . 'tests/') ? PATH_site .
'tests/' : PATH_site . 'typo3_src/tests/';
(line 840 in class.tx_phpunit_module1.php)
I currently don't have any idea how to deal with this in an elegant way.
Any suggestions?
2. Can we get rid of the @ in the tests and the production code?
3. in t3lib_lock, we don't need an else branch because the Exception
exits the function:
> Index: t3lib/class.t3lib_lock.php
> ===================================================================
> --- t3lib/class.t3lib_lock.php (revision 9760)
> +++ t3lib/class.t3lib_lock.php (working copy)
> @@ -158,6 +158,8 @@
>
> if (!$isAcquired) {
> throw new Exception('Lock file could not be created');
> + } else {
> + t3lib_div::fixPermissions($this->resource);
> }
So -1 at least until the tests work with both symlinks.
Oli
--
Certified TYPO3 Integrator | TYPO3 Security Team Member
More information about the TYPO3-team-core
mailing list