Fix PHP Warning about count()
- Reformat include/Photo.php
This commit is contained in:
parent
b384f838da
commit
95be3462ac
4 changed files with 114 additions and 104 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue