PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / trunk
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance vtrunk
4.7.0 4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 All 111 releases
← All changes | vendor/rosell-dk/webp-convert/src/Convert/Converters/AbstractConverter.php +2 -1 3.2.6 → trunk View file →
@@ -211,8 +211,9 @@
211 211 }
212 212
213 213 protected function logReduction($source, $destination)
214 214 {
215 + if (!file_exists($source) || !file_exists($destination)) return;
215 216 $sourceSize = filesize($source);
216 217 $destSize = filesize($destination);
217 218 $this->log(round(($sourceSize - $destSize) / $sourceSize * 100) . '% ');
218 219 if ($sourceSize < 10000) {
@@ -259,9 +260,9 @@
259 260
260 261 if (!@file_exists($destination)) {
261 262 throw new ConversionFailedException('Destination file is not there: ' . $destination);
262 263 } elseif (@filesize($destination) === 0) {
263 - unlink($destination);
264 + @unlink($destination);
264 265 throw new ConversionFailedException('Destination file was completely empty');
265 266 } else {
266 267 if (!isset($this->options['_suppress_success_message'])) {
267 268 $this->ln();