Bad parameter fixed
This commit is contained in:
		@@ -139,8 +139,8 @@ class ActivityPubPlugin extends Plugin
 | 
			
		||||
        }
 | 
			
		||||
        try {
 | 
			
		||||
            return Activitypub_notice::create_notice(
 | 
			
		||||
                    ActivityPub_explorer::get_profile_from_url($res->attributedTo),
 | 
			
		||||
                    $res->id,
 | 
			
		||||
                ActivityPub_explorer::get_profile_from_url($res->attributedTo),
 | 
			
		||||
                $res->id,
 | 
			
		||||
                $res->url,
 | 
			
		||||
                $res->content,
 | 
			
		||||
                $res->cc,
 | 
			
		||||
 
 | 
			
		||||
@@ -201,11 +201,11 @@ class Activitypub_notice extends Managed_DataObject
 | 
			
		||||
     * Validates a remote notice.
 | 
			
		||||
     *
 | 
			
		||||
     * @author Diogo Cordeiro <diogo@fc.up.pt>
 | 
			
		||||
     * @param Array $data
 | 
			
		||||
     * @param StdClass $data
 | 
			
		||||
     * @return boolean true in case of success
 | 
			
		||||
     * @throws Exception
 | 
			
		||||
     */
 | 
			
		||||
    public static function validate_remote_notice($data)
 | 
			
		||||
    public static function validate_remote_notice(&$data)
 | 
			
		||||
    {
 | 
			
		||||
        if (!isset($data->attributedTo)) {
 | 
			
		||||
            common_debug('ActivityPub Notice Validator: Rejected because attributedTo was not specified.');
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user