-2008-03-02 Martin Kutschker <masi@typo3.org>
+2008-03-16 Martin Kutschker <masi@typo3.org>
* Fixed bug #7793: Argument 1 passed to t3lib_div::arrayToLogString() in module setting must not be null (thanks to Steffen Kamper)
+ * Fixed bug #7861: t3lib_div::mkdir() should suppress PHP warnings/errors (thanks to Francois Suter)
2008-03-16 Ingo Renner <ingo@typo3.org>
*/
public static function mkdir($theNewFolder) {
$theNewFolder = preg_replace('|/$|','',$theNewFolder);
- if (mkdir($theNewFolder, octdec($GLOBALS['TYPO3_CONF_VARS']['BE']['folderCreateMask']))){
+ if (@mkdir($theNewFolder, octdec($GLOBALS['TYPO3_CONF_VARS']['BE']['folderCreateMask']))){
chmod($theNewFolder, octdec($GLOBALS['TYPO3_CONF_VARS']['BE']['folderCreateMask'])); //added this line, because the mode at 'mkdir' has a strange behaviour sometimes
if($GLOBALS['TYPO3_CONF_VARS']['BE']['createGroup']) { // skip this if createGroup is empty
- chgrp($theNewFolder, $GLOBALS['TYPO3_CONF_VARS']['BE']['createGroup']);
+ @chgrp($theNewFolder, $GLOBALS['TYPO3_CONF_VARS']['BE']['createGroup']);
}
- return TRUE;
+ return true;
+ } else {
+ return false;
}
}