From 472484dde041f0ce7e21dd04492821a7d0d385ea Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sun, 3 Nov 2024 20:34:17 +0100 Subject: Module\Thing: Don't try to escape field that's not present The `profile_assign` field is only present if the multiple profiles feature is enabled. --- Zotlabs/Module/Thing.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Thing.php b/Zotlabs/Module/Thing.php index b44b58370..a77081741 100644 --- a/Zotlabs/Module/Thing.php +++ b/Zotlabs/Module/Thing.php @@ -55,10 +55,13 @@ class Thing extends \Zotlabs\Web\Controller { $name = escape_tags($_POST['term']); $verb = escape_tags($_POST['verb']); $activity = intval($_POST['activity']); - $profile_guid = escape_tags($_POST['profile_assign']); $url = $_POST['url']; $photo = $_POST['img']; + $profile_guid = isset($_POST['profile_assign']) + ? escape_tags($_POST['profile_assign']) + : null; + $hash = new_uuid(); $verbs = obj_verbs(); -- cgit v1.2.3