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

actions/site_notifications/delete.php (1 issue)

1
<?php
2
$note = get_entity(get_input('guid'));
0 ignored issues
show
It seems like get_input('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

2
$note = get_entity(/** @scrutinizer ignore-type */ get_input('guid'));
Loading history...
3
if (!$note || !$note->canEdit()) {
4
	return elgg_error_response();
5
}
6
7
$note->delete();
8
9
return elgg_ok_response();
10