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

views/default/river/object/bookmarks/create.php (1 issue)

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

Bug Minor
1
<?php
2
/**
3
 * New bookmarks river entry
4
 *
5
 * @package Bookmarks
6
 */
7
8
$item = elgg_extract('item', $vars);
9
if (!$item instanceof ElggRiverItem) {
10
	return;
11
}
12
13
$object = $item->getObjectEntity();
14
$vars['message'] = elgg_get_excerpt($object->description);
0 ignored issues
show
It seems like $object->description can also be of type array; however, parameter $text of elgg_get_excerpt() 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 ignore-type  annotation

14
$vars['message'] = elgg_get_excerpt(/** @scrutinizer ignore-type */ $object->description);
Loading history...
15
$vars['attachments'] = elgg_view('output/url', ['href' => $object->address]);
16
17
echo elgg_view('river/elements/layout', $vars);
18