Use of filemtime() throws Error
-
Great plugin, BUT, on first installation when you visit front-end as a logged in user, the plugin throws the following error message:
Warning: filemtime(): stat failed for ../wp-content/plugins/wp-recall/add-on/theme-sunshine/img/default-cover.jpg in ../wp-content/plugins/wp-recall/add-on/theme-sunshine/index.php on line 103
I think you are trying to use filemtime() to retrieve the image path that has already been declared in your code. Here’s the original line 103:
$styles .= '#lk-conteyner{background-image: url(' . $cover_url . '?vers=' . filemtime( $cover_path ) . ');}';
The issue was solved by removing reference to filemtime() from the line 103. I also removed the unneeded ; between ) and } Like so:
$styles .= '#lk-conteyner{background-image: url(' . $cover_url . '?vers=' . $cover_path . ')}';
I hope this helps ??
- The topic ‘Use of filemtime() throws Error’ is closed to new replies.