Skip to content

Commit 88371b1

Browse files
authored
Improve error handling for creating autload_psr4.php (joomla#44763)
1 parent e6f343b commit 88371b1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libraries/namespacemap.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,9 @@ protected function writeNamespaceFile($elements)
145145
$error_reporting = error_reporting(0);
146146

147147
try {
148-
File::write($this->file, implode("\n", $content));
148+
if (!File::write($this->file, implode("\n", $content))) {
149+
throw new Exception('Could not save ' . $this->file, 500);
150+
}
149151
} catch (Exception $e) {
150152
Log::add('Could not save ' . $this->file, Log::WARNING);
151153

0 commit comments

Comments
 (0)