Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
in Themes by

In a theme there is a function for cache and I am getting warnings.

        $options = array('compress' => true);

        $parser = new Less_Parser($options);

        $update_cache = !file_exists($cache_file);

        $vars = ra_get_less_variables();

        if (!$update_cache) {

            $cacheData = unserialize(file_get_contents($cache_file));

            foreach ($cacheData['files'] as $file => $fileData) {

                if ($fileData['filemtime'] < filemtime($file)) {

                    $update_cache = true;





The line with the warning (PHP Warning:  filemtime(): stat failed) is:

                if ($fileData['filemtime'] < filemtime($file)) {

How can I fix this?

Thank you.

Q2A version: 1.8.8

Please log in or register to answer this question.

Welcome to the Q&A site for Question2Answer.

If you have a question about Q2A, please ask here, in English.

To report a bug, please create a new issue on Github or ask a question here with the bug tag.

If you just want to try Q2A, please use the demo site.