]> source.dussan.org Git - nextcloud-server.git/commitdiff
OC\Preview - use !== and === instead of != and ==
authorGeorg Ehrke <developer@georgehrke.com>
Fri, 12 Jul 2013 08:03:25 +0000 (10:03 +0200)
committerGeorg Ehrke <developer@georgehrke.com>
Fri, 12 Jul 2013 08:04:27 +0000 (10:04 +0200)
lib/preview.php

index 73e01a9e552552ccf363a9de87aab54bddd59f18..5576981225b52d25acf17f2831ab84fc9f717baf 100755 (executable)
@@ -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);