Answers for "Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file:"

PHP
0

Exception #0 (Magento\Framework\Exception\ValidatorException): 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; }
Posted by: Guest on May-28-2020

Code answers related to "Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file:"

Browse Popular Code Answers by Language