mirror of
https://github.com/friendica/friendica
synced 2025-04-25 02:30:11 +00:00
Quick fix PHP notices in various files
- Remove unused variables - Fix variable name typos - Use x() and defaults() to fix undefined index - Add back uninitialized variables
This commit is contained in:
parent
861c4c7474
commit
9f04017e27
9 changed files with 41 additions and 35 deletions
|
@ -662,7 +662,7 @@ class Contact extends BaseObject
|
|||
if (!DBM::is_result($contact)) {
|
||||
// The link could be provided as http although we stored it as https
|
||||
$ssl_url = str_replace('http://', 'https://', $url);
|
||||
$r = dba::select('contact', array('id', 'avatar-date'), array('`alias` IN (?, ?, ?) AND `uid` = ?', $url, normalise_link($url), $ssl_url, $uid), array('limit' => 1));
|
||||
$r = dba::select('contact', array('id', 'avatar', 'avatar-date'), array('`alias` IN (?, ?, ?) AND `uid` = ?', $url, normalise_link($url), $ssl_url, $uid), array('limit' => 1));
|
||||
$contact = dba::fetch($r);
|
||||
dba::close($r);
|
||||
}
|
||||
|
@ -674,7 +674,7 @@ class Contact extends BaseObject
|
|||
$update_contact = ($contact['avatar-date'] < datetime_convert('', '', 'now -7 days'));
|
||||
|
||||
// We force the update if the avatar is empty
|
||||
if ($contact['avatar'] == '') {
|
||||
if (!x($contact, 'avatar')) {
|
||||
$update_contact = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue