From 14c26a6008e357f0eb7ba36e8388dcb30db82f71 Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Tue, 29 Dec 2015 18:29:11 -0500 Subject: [PATCH] Ignore symlinks that point to nothing Fixes #7 --- src/Parser.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Parser.php b/src/Parser.php index f703f14..14984b9 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -112,6 +112,10 @@ function(Tag $tag) use ($source) { */ protected function getContents($filePath) { + # Ignore the empty symlinks that emacs leaves + if (!file_exists($filePath)) { + return false; + } $source = file_get_contents($filePath); if ($source === false) { throw new \Exception(