Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / symfony / config / Resource / FileResource.php
index 6ad130518854c1609190f5792e586cde2c31f55b..1d373a623acfc40e8f12200a5c1d4088db10d10d 100644 (file)
@@ -26,8 +26,6 @@ class FileResource implements SelfCheckingResourceInterface, \Serializable
     private $resource;
 
     /**
-     * Constructor.
-     *
      * @param string $resource The file path to the resource
      *
      * @throws \InvalidArgumentException
@@ -62,7 +60,7 @@ class FileResource implements SelfCheckingResourceInterface, \Serializable
      */
     public function isFresh($timestamp)
     {
-        return file_exists($this->resource) && @filemtime($this->resource) <= $timestamp;
+        return false !== ($filemtime = @filemtime($this->resource)) && $filemtime <= $timestamp;
     }
 
     public function serialize()