Extra slash being appended to $upload$ on selecting slide image
-
Hi,
Using: SmartSlider
3.5.1.21
, WordPress5.9.2
and PHP7.4
I’m getting a warning thrown when accessing a page with a slider because an extra ‘/’ is appended after $upload$ when selecting media for a slide background, resulting in a file uri such as$upload$//an_image.jpeg
. Here is the warning:Warning: get_headers(): This function may only be used against URLs in /home/user/public_html/wp-content/plugins/smart-slider-3/Nextend/Framework/Cache/CacheImage.php on line 116 Warning: Invalid argument supplied for foreach() in /home/user/public_html/wp-content/plugins/smart-slider-3/Nextend/Framework/Cache/CacheImage.php on line 118
Which is caused by this code block:
// wp-content/plugins/smart-slider-3/Nextend/Framework/Cache/CacheImage.php:105 // $originalFile = /var/www/html/wp-content/themes/theme/images//an_image.jpg if (strpos($originalFile, '//') !== false) { $manifestData['mtime'] = $this->getRemoteMTime($originalFile);
which decides that $originalFile is a URL, even though it is a file path, because of the ‘//’ in the file path.
This can all be worked around by removing the extra ‘/’ in the slide background’s file uri manually, so it reads as
$upload$/an_image.jpeg
, but this is not an ideal solution for multiple people working on a site.Is this extra ‘/’ after $upload$ being added because of a theme conflict? Or is there faulty logic here which needs to be corrected?
- The topic ‘Extra slash being appended to $upload$ on selecting slide image’ is closed to new replies.