View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0025953 | mantisbt | plug-ins | public | 2019-08-02 14:17 | 2019-08-25 12:36 |
Reporter | dregad | Assigned To | dregad | ||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Target Version | 2.22.0 | Fixed in Version | 2.22.0 | ||
Summary | 0025953: Missing an API function to check if a plugin event has been declared | ||||
Description | I need to make a plugin adapt itself to the presence of an event declared by another, optional plugin. If said plugin is not installed, or is an older version, then MantisBT throws a warning when trying to hook the event (2400: Event "xxx" has not yet been declared). This could be done manually by checking | ||||
Tags | No tags attached. | ||||
MantisBT: master a7098970 2019-08-03 04:56 Details Diff |
New event_is_declared() function Note: use isset() instead of array_key_exists() as discussed in PR https://github.com/mantisbt/mantisbt/pull/1534#discussion_r310346891 Replace usage of isset( $g_event_cache[...] ) elsewhere in event API, by calls to the new function. Fixes 0025953 |
Affected Issues 0025953 |
|
mod - core/event_api.php | Diff File |