Skip to content

Commit f732a66

Browse files
Bernhard Schmittmficzel
authored andcommitted
Adjust Neos.Flow Utility subcontext
1 parent 25d723e commit f732a66

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

Neos.Flow/Classes/Utility/Algorithms.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class Algorithms
3636
*/
3737
public static function generateUUID(): string
3838
{
39-
if (is_callable('uuid_create')) {
39+
if (function_exists('uuid_create')) {
4040
return strtolower(uuid_create(UUID_TYPE_RANDOM));
4141
}
4242

Neos.Flow/Classes/Utility/Environment.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,18 +140,15 @@ public static function composeTemporaryDirectoryName(string $temporaryDirectoryB
140140
*
141141
* @param string $temporaryDirectoryBase Full path to the base for the temporary directory
142142
* @return string The full path to the temporary directory
143-
* @throws UtilityException if the temporary directory could not be created or is not writable
143+
* @throws FilesException if the temporary directory could not be created
144+
* @throws UtilityException if the temporary directory is not writable
144145
*/
145146
protected function createTemporaryDirectory(string $temporaryDirectoryBase): string
146147
{
147148
$temporaryDirectory = self::composeTemporaryDirectoryName($temporaryDirectoryBase, $this->context);
148149

149150
if (!is_dir($temporaryDirectory) && !is_link($temporaryDirectory)) {
150-
try {
151-
Files::createDirectoryRecursively($temporaryDirectory);
152-
} catch (ErrorException $exception) {
153-
throw new UtilityException('The temporary directory "' . $temporaryDirectory . '" could not be created. Please make sure permissions are correct for this path or define another temporary directory in your Settings.yaml with the path "Neos.Flow.utility.environment.temporaryDirectoryBase".', 1335382361);
154-
}
151+
Files::createDirectoryRecursively($temporaryDirectory);
155152
}
156153

157154
if (!is_writable($temporaryDirectory)) {

0 commit comments

Comments
 (0)