Merge branch '5.2' into 5.3
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / util / ExceptionLogUtil.class.php
index 36162b1c7d385692fc3273cdc1067bd5b0bdfc9c..161d4615fd82967dc8aceb4d5dc3925dba27d4dc 100644 (file)
@@ -27,6 +27,10 @@ final class ExceptionLogUtil {
                $split = new Regex('(?:^|\n<<<<\n\n)(?:<<<<<<<<([a-f0-9]{40})<<<<\n|$)');
                $contents = $split->split($contents, Regex::SPLIT_NON_EMPTY_ONLY | Regex::CAPTURE_SPLIT_DELIMITER);
                
+               if (empty($contents)) {
+                       return [];
+               }
+               
                // even items become keys, odd items become values
                return array_merge(...array_map(
                        function($v) {