Skip to content
This repository
Browse code

[Captcha] DI - fixed bug when assets are not installed yet

  • Loading branch information...
commit 87e517e5fb32ea855fb8c50ec696d98d2331e7d7 1 parent 111c3ef
Bilal Amarni authored February 21, 2013
5  DependencyInjection/GenemuFormExtension.php
@@ -80,9 +80,14 @@ private function registerCaptchaConfiguration(array $configs, ContainerBuilder $
80 80
         foreach ($configs['fonts'] as $index => $font) {
81 81
             if (is_file($fontDir . '/' . $font)) {
82 82
                 $configs['fonts'][$index] = $fontDir . '/' . $font;
  83
+            } else {
  84
+                unset($configs['fonts'][$index]);
83 85
             }
84 86
         }
85 87
         unset($configs['font_dir']);
  88
+        if (empty($configs['fonts'])) {
  89
+            unset($configs['fonts']);
  90
+        }
86 91
 
87 92
         $backgroundColor = preg_replace('/[^0-9A-Fa-f]/', '', $configs['background_color']);
88 93
         if (!in_array(strlen($backgroundColor), array(3, 6), true)) {

0 notes on commit 87e517e

Please sign in to comment.
Something went wrong with that request. Please try again.