From 0ba9f9cb5da8f52af82db43fb534750b192f0cca Mon Sep 17 00:00:00 2001 From: YJ Tso Date: Wed, 18 May 2016 14:39:05 -0700 Subject: [PATCH] Fix #29 Fixes issue #29 --- core/components/statcache/lib/StatCache.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/components/statcache/lib/StatCache.php b/core/components/statcache/lib/StatCache.php index 68e7e18..f31fdda 100644 --- a/core/components/statcache/lib/StatCache.php +++ b/core/components/statcache/lib/StatCache.php @@ -44,7 +44,8 @@ public function getStaticPath($resource, array $options = array()) { if (!$resource instanceof modResource) { return false; } - + + if ($resource->Context->config === null) $resource->Context->prepare(); $path = $resource->Context->getOption('statcache_path', MODX_BASE_PATH . 'statcache', $options); /* generate an absolute URI representation of the Resource to append to the path */