[buddypress-trac] [BuddyPress Trac] #6119: Imports cause PHP Warnings in bp_blogs_format_activity_action_new_blog_post

buddypress-trac noreply at wordpress.org
Sat Jan 17 04:46:06 UTC 2015


#6119: Imports cause PHP Warnings in bp_blogs_format_activity_action_new_blog_post
------------------------------+---------------------
 Reporter:  DJPaul            |       Owner:  imath
     Type:  defect (bug)      |      Status:  closed
 Priority:  normal            |   Milestone:  2.2
Component:  Blogs             |     Version:
 Severity:  normal            |  Resolution:  fixed
 Keywords:  has-patch commit  |
------------------------------+---------------------
Changes (by imath):

 * owner:   => imath
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"9369"]:
 {{{
 #!CommitTicketReference repository="" revision="9369"
 Fix notice errors when an activity is generated for a post having no
 title.

 Post types activities are using dynamic action strings when the activity
 is displayed in the stream and when the activity is saved into the
 database. In this particular case, once the post is published, we are
 "faking" an activity object to which we add two extra properties : the
 post_title and the post_url. To avoid switching blogs too many times, we
 are saving the post title into an activity meta. To know if we must build
 the action string for insert or display, we are checking the post_title
 property of the activity object. When a post is published without a title,
 the `empty()` check was not right. Changing for an `isset()` check
 prevents the notice errors.

 props boonebgorges

 Fixes #6119
 }}}

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6119#comment:11>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list