Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Exception #0 (MagentoFrameworkExceptionValidatorException): Invalid template file:

> protected function isPathInDirectories($path, $directories) {
>     if (!is_array($directories)) {
>         $directories = (array)$directories;
>     }
>     $realPath = $this->fileDriver->getRealPath($path);
>     $realPath = str_replace('', '/', $realPath); // extra code added
>     foreach ($directories as $directory) {
>         if (0 === strpos($realPath, $directory)) {
>             return true;
>         }
>     }
>     return false; }
Source by magento.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #Exception #Invalid #template
ADD COMMENT
Topic
Name
7+6 =