]> source.dussan.org Git - nextcloud-server.git/commitdiff
fixing php notice: Undefined index key
authorThomas Müller <thomas.mueller@tmit.eu>
Thu, 31 Oct 2013 09:02:18 +0000 (10:02 +0100)
committertomneedham <tom@owncloud.com>
Tue, 18 Feb 2014 17:19:35 +0000 (17:19 +0000)
lib/ocs/privatedata.php

index e528dfbcb7443a1c0315234689ff085ac49193e3..4b16268b8f40ba14cc356f064c2c3d3477f08bef 100644 (file)
@@ -35,7 +35,7 @@ class OC_OCS_Privatedata {
        public static function get($parameters) {
                $user = OC_User::getUser();
                $app = addslashes(strip_tags($parameters['app']));
-               $key = addslashes(strip_tags($parameters['key']));
+               $key = isset($parameters['key']) ?addslashes(strip_tags($parameters['key'])) : null;
                
                if(empty($key)) {
                        $query = \OCP\DB::prepare('SELECT `key`, `app`, `value`  FROM `*PREFIX*privatedata` WHERE `user` = ? AND `app` = ? ');