diff --git a/Component.php b/Component.php index dcbe764c5..6768fdcbb 100644 --- a/Component.php +++ b/Component.php @@ -170,7 +170,7 @@ protected function extractBladeViewFromString($contents) return static::$bladeViewCache[$key]; } - if (strlen($contents) <= PHP_MAXPATHLEN && $this->factory()->exists($contents)) { + if ($this->factory()->exists($contents)) { return static::$bladeViewCache[$key] = $contents; } diff --git a/FileViewFinder.php b/FileViewFinder.php index 107bf7c36..4b2f32679 100755 --- a/FileViewFinder.php +++ b/FileViewFinder.php @@ -128,7 +128,9 @@ protected function findInPaths($name, $paths) { foreach ((array) $paths as $path) { foreach ($this->getPossibleViewFiles($name) as $file) { - if ($this->files->exists($viewPath = $path.'/'.$file)) { + $viewPath = $path.'/'.$file; + + if (strlen($viewPath) <= PHP_MAXPATHLEN && $this->files->exists($viewPath)) { return $viewPath; } }