Fix PHP Warning about count()

- Reformat include/Photo.php
This commit is contained in:
Hypolite Petovan 2018-07-10 23:56:30 -04:00
commit 95be3462ac
4 changed files with 114 additions and 104 deletions

View file

@ -45,7 +45,7 @@ function run_submit($url)
}
//Remove duplicates.
if (count($r) > 1) {
if (is_array($r) && count($r) > 1) {
for ($i = 1; $i < count($r); $i++) {
logger('Removed duplicate profile ' . intval($r[$i]['id']));
q("DELETE FROM `photo` WHERE `profile-id` = %d LIMIT 1",