Checks if the types of the passed arguments in a function/method call are compatible.
1 | <?php |
||||
2 | /** |
||||
3 | * View a bookmark |
||||
4 | * |
||||
5 | * @package ElggBookmarks |
||||
6 | */ |
||||
7 | |||||
8 | $guid = elgg_extract('guid', $vars); |
||||
9 | |||||
10 | elgg_entity_gatekeeper($guid, 'object', 'bookmarks'); |
||||
11 | |||||
12 | $bookmark = get_entity($guid); |
||||
13 | |||||
14 | $page_owner = elgg_get_page_owner_entity(); |
||||
15 | |||||
16 | elgg_group_gatekeeper(); |
||||
17 | |||||
18 | $crumbs_title = $page_owner->name; |
||||
19 | |||||
20 | if ($page_owner instanceof ElggGroup) { |
||||
21 | elgg_push_breadcrumb($crumbs_title, "bookmarks/group/$page_owner->guid/all"); |
||||
22 | } else { |
||||
23 | elgg_push_breadcrumb($crumbs_title, "bookmarks/owner/$page_owner->username"); |
||||
24 | } |
||||
25 | |||||
26 | $title = $bookmark->title; |
||||
27 | |||||
28 | elgg_push_breadcrumb($title); |
||||
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||
29 | |||||
30 | $content = elgg_view_entity($bookmark, [ |
||||
31 | 'full_view' => true, |
||||
32 | 'show_responses' => true, |
||||
33 | ]); |
||||
34 | |||||
35 | $body = elgg_view_layout('content', [ |
||||
36 | 'content' => $content, |
||||
37 | 'title' => $title, |
||||
38 | 'filter' => '', |
||||
39 | ]); |
||||
40 | |||||
41 | echo elgg_view_page($title, $body); |
||||
0 ignored issues
–
show
It seems like
$title can also be of type array ; however, parameter $title of elgg_view_page() does only seem to accept string , maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
42 |