diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index a821cf8e94fb750812d51c47e471bdfe88cf57d1..fd46165b7946bb834635ac6107a16268abd1d645 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -70,7 +70,9 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') } if ($action == 'update') $bookmark->fetch($_POST["id"]); - $bookmark->fk_user=$userid; + // Check if null because user not admin can't set an user and send empty value here. + if(!empty($userid)) + $bookmark->fk_user=$userid; $bookmark->title=$title; $bookmark->url=$url; $bookmark->target=$target;