]> source.dussan.org Git - nextcloud-server.git/commitdiff
VCategories: Suppress error messages stemming from import from file app.
authorThomas Tanghus <thomas@tanghus.net>
Sun, 13 May 2012 07:16:53 +0000 (09:16 +0200)
committerThomas Tanghus <thomas@tanghus.net>
Sun, 13 May 2012 07:16:53 +0000 (09:16 +0200)
lib/vcategories.php

index b3b6a493c8dc9872e5abd7fcc02a5637dfa22b73..7b3844bf68904f5943276728ef9127feea4cb5e1 100644 (file)
@@ -96,7 +96,7 @@ class OC_VCategories {
                        }
                }
                if(count($newones) > 0) {
-                       $this->categories = array_merge($this->categories, $newones);
+                       $this->categories = @array_merge($this->categories, $newones);
                        if($sync === true) {
                                $this->save();
                        }
@@ -199,7 +199,7 @@ class OC_VCategories {
 
        // case-insensitive in_array
        private function in_arrayi($needle, $haystack) {
-               return in_array(strtolower($needle), array_map('strtolower', $haystack));
+               return in_array(strtolower($needle), @array_map('strtolower', $haystack));
        }
 
        // case-insensitive array_search