Skip to:
Content

BuddyPress.org

Changeset 7517


Ignore:
Timestamp:
11/05/2013 07:13:48 PM (12 years ago)
Author:
boonebgorges
Message:

Check for $_POST payload to avoid PHP warnings when posting updates

Fixes #5227

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-actions.php

    r7390 r7517  
    255255
    256256    // Get activity info
    257     $content = apply_filters( 'bp_activity_post_update_content', $_POST['whats-new']             );
    258     $object  = apply_filters( 'bp_activity_post_update_object',  $_POST['whats-new-post-object'] );
    259     $item_id = apply_filters( 'bp_activity_post_update_item_id', $_POST['whats-new-post-in']     );
     257    $content = apply_filters( 'bp_activity_post_update_content', $_POST['whats-new'] );
     258
     259    if ( ! empty( $_POST['whats-new-post-object'] ) ) {
     260        $object = apply_filters( 'bp_activity_post_update_object', $_POST['whats-new-post-object'] );
     261    }
     262
     263    if ( ! empty( $_POST['whats-new-post-in'] ) ) {
     264        $item_id = apply_filters( 'bp_activity_post_update_item_id', $_POST['whats-new-post-in'] );
     265    }
    260266
    261267    // No activity content so provide feedback and redirect
Note: See TracChangeset for help on using the changeset viewer.