Parcourir la source

Extensions: Add Log->debug

Visman il y a 1 an
Parent
commit
56160a3a94
1 fichiers modifiés avec 9 ajouts et 0 suppressions
  1. 9 0
      app/Models/Extension/Extensions.php

+ 9 - 0
app/Models/Extension/Extensions.php

@@ -171,6 +171,15 @@ class Extensions extends Manager
             if (! \is_array($file)) {
                 continue;
             } elseif (! $v->validation($file)) {
+                $this->c->Log->debug(
+                    'Extension: Bad structure for '
+                    . \preg_replace('%^.+((?:[\\\\/]+[^\\\\/]+){3})$%', '$1', $path),
+                    [
+                        'errors'  => \array_map('\\ForkBB\__', $v->getErrorsWithoutType()),
+                        'headers' => false,
+                    ]
+                );
+
                 continue;
             }