Opened 8 years ago
Closed 8 years ago
#7324 closed defect (bug) (fixed)
Possible php warnings in bp_legacy_theme_delete_activity_comment()
Reported by: | Jonas Lundman | Owned by: | slaFFik |
---|---|---|---|
Milestone: | 2.8 | Priority: | lowest |
Severity: | normal | Version: | |
Component: | Core | Keywords: | has-patch |
Cc: |
Description
Issue in
bp_legacy_theme_delete_activity_comment()
This call:
$comment = new BP_Activity_Activity( $_POST['id'] );
is done before verifying the POST id :
if ( empty( $_POST['id'] ) || ! is_numeric( $_POST['id'] ) ) exit( '-1' );
PHP warnings breaks the response
Attachments (1)
Change History (8)
#1
@
8 years ago
- Milestone changed from Awaiting Review to 2.8
- Summary changed from Comment reply php warnings to Possible php warnings in bp_legacy_theme_delete_activity_comment()
- Version 2.7 deleted
This ticket was mentioned in Slack in #buddypress by slaffik. View the logs.
8 years ago
#4
@
8 years ago
- Keywords needs-patch added; has-patch removed
This needs a new patch @slaFFik . It should JUST make the change described in this ticket to fix it; the other code improvements should go in separately. What I normally do when about to commit patches like this, is do a commit just for the fix, then a second commit for the miscellaneous improvements. But when sharing a patch up for review, it's as concise and as targeted as possible.
Jonas Lundman, thanks for your first submitted issue!
I don't see any problems in reordering some lines with checks in this function. I will prepare the patch.