Permalink
Browse files

Added error suppression to unlink() calls

Added error suppression to unlink() calls in the getPropertyAnnotations and getMethodAnnotations methods to be consistent with the getClassAnnotations method.
  • Loading branch information...
1 parent d8c17cd commit 263cd32dd64c26497c22c9b537fee128bff00715 @SalmanPK SalmanPK committed Nov 22, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Doctrine/Common/Annotations/FileCacheReader.php
@@ -138,7 +138,7 @@ public function getPropertyAnnotations(\ReflectionProperty $property)
if ($this->debug
&& (false !== $filename = $class->getFilename())
&& filemtime($path) < filemtime($filename)) {
- unlink($path);
+ @unlink($path);
$annot = $this->reader->getPropertyAnnotations($property);
$this->saveCacheFile($path, $annot);
@@ -176,7 +176,7 @@ public function getMethodAnnotations(\ReflectionMethod $method)
if ($this->debug
&& (false !== $filename = $class->getFilename())
&& filemtime($path) < filemtime($filename)) {
- unlink($path);
+ @unlink($path);
$annot = $this->reader->getMethodAnnotations($method);
$this->saveCacheFile($path, $annot);

0 comments on commit 263cd32

Please sign in to comment.