Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/documentserver_community.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2020-02-25 19:37:14 +0300
committerRobin Appelman <robin@icewind.nl>2020-03-19 16:27:52 +0300
commitd6a76d2ceae02f3c2cee087971147ee14e4ba0ef (patch)
treee3cb5ebbb4a30c42384a4f0576334844181de6d2
parent193095af32c233aabcdc920e249eef71cec8e41e (diff)
improve fontmanager error handling
-rw-r--r--lib/Document/FontManager.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Document/FontManager.php b/lib/Document/FontManager.php
index 077b573..4e92bfc 100644
--- a/lib/Document/FontManager.php
+++ b/lib/Document/FontManager.php
@@ -61,7 +61,11 @@ class FontManager {
];
$pipes = [];
- proc_open($cmd, $descriptorSpec, $pipes, ConverterBinary::BINARY_DIRECTORY, []);
+ $process = proc_open($cmd, $descriptorSpec, $pipes, ConverterBinary::BINARY_DIRECTORY, []);
+
+ if (!$process) {
+ throw new \Exception("Failed to start allfontsgen");
+ }
fclose($pipes[0]);
$error = stream_get_contents($pipes[2]);