From 06d1297fbe5ad18e8d201aa100aae239df862157 Mon Sep 17 00:00:00 2001 From: Christopher Pitt Date: Thu, 24 Nov 2016 08:05:56 +1300 Subject: [PATCH] Replace hard-coded directory separators constant This removes warnings when building the manifest cache in Windows environments. --- src/Core/Manifest/ManifestCache_File.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Core/Manifest/ManifestCache_File.php b/src/Core/Manifest/ManifestCache_File.php index 477ef0a02..81033669f 100644 --- a/src/Core/Manifest/ManifestCache_File.php +++ b/src/Core/Manifest/ManifestCache_File.php @@ -12,7 +12,7 @@ class ManifestCache_File implements ManifestCache function __construct($name) { - $this->folder = TEMP_FOLDER . '/' . $name; + $this->folder = TEMP_FOLDER . DIRECTORY_SEPARATOR . $name; if (!is_dir($this->folder)) { mkdir($this->folder); } @@ -20,18 +20,18 @@ class ManifestCache_File implements ManifestCache function load($key) { - $file = $this->folder . '/cache_' . $key; + $file = $this->folder . DIRECTORY_SEPARATOR . 'cache_' . $key; return file_exists($file) ? unserialize(file_get_contents($file)) : null; } function save($data, $key) { - $file = $this->folder . '/cache_' . $key; + $file = $this->folder . DIRECTORY_SEPARATOR . 'cache_' . $key; file_put_contents($file, serialize($data)); } function clear() { - array_map('unlink', glob($this->folder . '/cache_*')); + array_map('unlink', glob($this->folder . DIRECTORY_SEPARATOR . 'cache_*')); } }