While working with a project on Xampp with php 7.4 getting this error. The line 553 is;
if ($this->data['avatar_id'] == 0)
I realize that it is searching avatar_id in DB_USERS but it is located in DB_ACCOUNTS. I think this is caused the problem but i couldn't find how to solve.
These are to complete code block;
private function getData()
{
global $config;
$query = $this->getConnection()->query("SELECT * FROM " . DB_USERS . " WHERE id=" . $this->id);
if ($query->num_rows == 1)
{
$fetch = $query->fetch_array(MYSQLI_ASSOC);
if (! empty($fetch['birthday']))
{
if (!preg_match('/(\-|\/)/', $fetch['birthday'])) $this->getConnection()->query("UPDATE " . DB_USERS . " SET birthday='01/01/2000' WHERE id=" . $this->id);
$fetch['birth'] = explode('-', $fetch['birthday']);
if (isset($fetch['birth'][1]))
{
$fetch['birth'] = array(
'date' => (int) $fetch['birth'][0],
'month' => (int) $fetch['birth'][1],
'year' => (int) $fetch['birth'][2]
);
}
else
{
$fetch['birth'] = explode('/', $fetch['birthday']);
$fetch['birth'] = array(
'date' => (int) $fetch['birth'][1],
'month' => (int) $fetch['birth'][0],
'year' => (int) $fetch['birth'][2]
);
}
}
if ($this->data['avatar_id'] == 0)
{
$fetch['thumbnail_url'] = $fetch['avatar_url'] = SITE_URL . '/' . $config['user_default_male_avatar'];
if (! empty($fetch['gender']))
{
if ($fetch['gender'] == "female")
{
$fetch['thumbnail_url'] = $fetch['avatar_url'] = SITE_URL . '/' . $config['user_default_female_avatar'];
}
}
}
$fetch['location'] = $fetch['current_city'];
return $fetch;
}
}