Opened 12 years ago
Closed 12 years ago
#4536 closed enhancement (fixed)
Bug in bp_get_send_message_button()
Reported by: | megainfo | Owned by: | MegaInfo |
---|---|---|---|
Milestone: | 1.8 | Priority: | low |
Severity: | minor | Version: | 1.6.1 |
Component: | Messages | Keywords: | |
Cc: | megainfodz@… |
Description
I was try to add filter to bp_get_send_message_button function
i get error
Fatal error: Cannot use assign-op operators with overloaded objects nor string offsets in C:\[My wp dev dir]\wp-content\themes\buddypow\includes\bp\bp-theme.php on line 937
i see the code of bp_get_send_message_button function
the filter is applied after getting the html of button.
i was attached a suggestive patch.
Attachments (1)
Change History (6)
#1
follow-up:
↓ 3
@
12 years ago
- Milestone changed from Awaiting Review to 1.7
- Priority changed from normal to low
- Severity changed from major to minor
- Type changed from defect (bug) to enhancement
Attached patch changes the way this function works. While I'm not opposed to the idea (I actually like it better) we can't change the way this works for others that are using it this way.
Basically it comes down to your filter is doing it wrong. If you want to use this filter and manipulate the output of the button, you'll need to use some regex, or create your own new function and button.
#3
in reply to:
↑ 1
@
12 years ago
Replying to johnjamesjacoby:
Attached patch changes the way this function works. While I'm not opposed to the idea (I actually like it better) we can't change the way this works for others that are using it this way.
Basically it comes down to your filter is doing it wrong. If you want to use this filter and manipulate the output of the button, you'll need to use some regex, or create your own new function and button.
I raised this in another trac ticket -- I think it's the code for bp_get_send_message_button that's wrong -- it's done differently to other buttons, and the filter can't work: http://buddypress.trac.wordpress.org/ticket/4650
#4
@
12 years ago
rogercoathup is correct that every other button filter in BP filters the args rather than the HTML.
I'd be surprised if anyone out there is using the filter as it stands, because it'd be such a PITA to use. However, I don't want to break anyone's site or plugin, so I'm going to add a separate filter and leave an inline comment telling devs not to use the existing one.
correction of bp_get_send_message_button function