Afform - gracefully handle missing html files
authorColeman Watts <coleman@civicrm.org>
Sat, 11 Sep 2021 16:12:12 +0000 (12:12 -0400)
committerColeman Watts <coleman@civicrm.org>
Sat, 11 Sep 2021 16:12:12 +0000 (12:12 -0400)
ext/afform/core/Civi/Afform/AngularDependencyMapper.php

index a893cae4991d19ba62e6a29a55a734f2d081ceac..ad5012e521ab3e9e4e69de146171495a04c3f489 100644 (file)
@@ -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);