Passed
Push — master ( c0a3a7...3b84a4 )
by Jeroen
58:51
created

mod/likes/views/default/likes/popup.php (1 issue)

Checks if the types of the passed arguments in a function/method call are compatible.

Bug Minor
1
<?php
2
3
$guid = get_input("guid");
4
5
if (!get_entity($guid)) {
0 ignored issues
show
It seems like $guid can also be of type string; however, parameter $guid of get_entity() does only seem to accept integer, 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 ignore-type  annotation

5
if (!get_entity(/** @scrutinizer ignore-type */ $guid)) {
Loading history...
6
	echo elgg_echo("error:missing_data");
7
	return;
8
}
9
10
$list = elgg_list_annotations([
11
	'guid' => $guid,
12
	'annotation_name' => 'likes',
13
	'limit' => 99,
14
	'preload_owners' => true,
15
	'pagination' => false,
16
]);
17
18
echo elgg_format_element('div', ['class' => 'elgg-likes-popup'], $list);
19