Ticket #8236: 8236.1.patch
| File 8236.1.patch, 1.2 KB (added by , 6 years ago) |
|---|
-
wp-content/plugins/trunk/src/bp-activity/classes/class-bp-activity-activity.php
263 263 return $this->errors; 264 264 } 265 265 266 if ( 'activity_update' === $this->type && empty( $this->content ) ) { 267 if ( 'bool' === $this->error_type ) { 268 return false; 269 } else { 270 $this->errors->add( 'bp_activity_missing_content', __( 'Please enter some content to post.', 'buddypress' ) ); 271 272 return $this->errors; 273 } 274 } 275 266 276 if ( empty( $this->component ) || empty( $this->type ) ) { 267 277 if ( 'bool' === $this->error_type ) { 268 278 return false; 269 279 } else { 270 280 if ( empty( $this->component ) ) { 271 $this->errors->add( 'bp_activity_missing_component' );281 $this->errors->add( 'bp_activity_missing_component', __( 'You need to define a component parameter to insert activity.', 'buddypress' ) ); 272 282 } else { 273 $this->errors->add( 'bp_activity_missing_type' );283 $this->errors->add( 'bp_activity_missing_type', __( 'You need to define a type parameter to insert activity.', 'buddypress' ) ); 274 284 } 275 285 276 286 return $this->errors;