Opened 12 years ago
Closed 12 years ago
#5671 closed defect (bug) (fixed)
Unable to register class method as template stack location
| Reported by: | johnjamesjacoby | Owned by: | johnjamesjacoby |
|---|---|---|---|
| Priority: | high | Milestone: | 2.1 |
| Component: | Appearance - Template Pack | Version: | 1.7 |
| Severity: | major | Keywords: | commit |
| Cc: |
Description
In bp_register_template_stack() the function_exists() check is preventing class methods from being used as a callback.
Change History (6)
#3
follow-up:
↓ 5
@
12 years ago
- Resolution fixed
- Status closed → reopened
Best is probably to use is_callable(). Then indiscriminate arrays won't be allowed through, and you only have to do a single check for all PHP callable types.
#5
in reply to: ↑ 3
@
12 years ago
Replying to boonebgorges:
Best is probably to use
is_callable(). Then indiscriminate arrays won't be allowed through, and you only have to do a single check for all PHP callable types.
Duh. Thanks for this. Much nicer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 8461: