diff --git a/lib/preview.php b/lib/preview.php index 73e01a9e552552ccf363a9de87aab54bddd59f18..5576981225b52d25acf17f2831ab84fc9f717baf 100755 --- a/lib/preview.php +++ b/lib/preview.php @@ -305,7 +305,7 @@ class Preview { $y = $size[1]; $aspectratio = $x / $y; - if($aspectratio != $wantedaspectratio) { + if($aspectratio !== $wantedaspectratio) { continue; } @@ -691,7 +691,7 @@ class PreviewManager { } $path = \OC\Files\Filesystem::normalizePath($path, false); - if(substr($path, 0, 1) == '/') { + if(substr($path, 0, 1) === '/') { $path = substr($path, 1); } @@ -768,7 +768,7 @@ class PreviewManager { public static function post_delete($args) { $path = $args['path']; - if(substr($path, 0, 1) == '/') { + if(substr($path, 0, 1) === '/') { $path = substr($path, 1); } $preview = new Preview(\OC_User::getUser(), 'files/', $path, 0, 0, false, true);