chiark / gitweb /
Semi-graceful handling of unknown anti-features.
authorHans-Emil Skogh <hansemil@gmail.com>
Mon, 23 Jan 2012 20:13:32 +0000 (21:13 +0100)
committerHans-Emil Skogh <hansemil@gmail.com>
Mon, 23 Jan 2012 20:13:32 +0000 (21:13 +0100)
wp-fdroid/wp-fdroid.php

index fc18f6d37c4b8bba0b1c66c7ccad5a3c552f35e5..0a8b253032e12e560ea2ee00c5cb3eebf4b74dd7 100644 (file)
@@ -414,7 +414,11 @@ class FDroid
                $antifeatureDesctiption['nonfreedep']['name'] = 'Non-Free Dependencies';
                $antifeatureDesctiption['nonfreedep']['description'] = 'This application depends on another non-Free application';
 
-               return $antifeatureDesctiption[strtolower($antifeature)];
+               $antifeatureLower = strtolower($antifeature);
+               if(isset($antifeatureDesctiption[$antifeatureLower])) {
+                       return $antifeatureDesctiption[$antifeatureLower];
+               }
+               return array('name'=>$antifeature);
        }