From 686d801a62209e5cc4057c2628e6408b10c55fee Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sat, 11 Sep 2021 12:12:12 -0400 Subject: [PATCH] Afform - gracefully handle missing html files --- ext/afform/core/Civi/Afform/AngularDependencyMapper.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/afform/core/Civi/Afform/AngularDependencyMapper.php b/ext/afform/core/Civi/Afform/AngularDependencyMapper.php index a893cae499..ad5012e521 100644 --- a/ext/afform/core/Civi/Afform/AngularDependencyMapper.php +++ b/ext/afform/core/Civi/Afform/AngularDependencyMapper.php @@ -49,6 +49,10 @@ class AngularDependencyMapper { $jFile = $scanner->findFilePath($formName, 'aff.json'); $hFile = $scanner->findFilePath($formName, 'aff.html'); + if (!$hFile) { + \Civi::log()->warning("Missing html file for Afform: '$jFile'"); + continue; + } $jStat = stat($jFile); $hStat = stat($hFile); -- 2.25.1