From 4c287ef6405cf5e37b77808f8d8a831c9809c03d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20M=C3=BCller?= Date: Thu, 31 Oct 2013 10:02:18 +0100 Subject: [PATCH] fixing php notice: Undefined index key --- lib/ocs/privatedata.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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` = ? '); -- 2.39.5