From: Thomas Müller Date: Thu, 31 Oct 2013 09:02:18 +0000 (+0100) Subject: fixing php notice: Undefined index key X-Git-Tag: v5.0.15RC1~2^2~9 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4c287ef6405cf5e37b77808f8d8a831c9809c03d;p=nextcloud-server.git fixing php notice: Undefined index key --- diff --git a/lib/ocs/privatedata.php b/lib/ocs/privatedata.php index e528dfbcb74..4b16268b8f4 100644 --- a/lib/ocs/privatedata.php +++ b/lib/ocs/privatedata.php @@ -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` = ? ');