I have simple PHP code like this
$revenue = $this->dailyCounts['revenue'][$date]['net_revenue'] + (!empty($activity[$date]) ? $activity[$date] : 0) * 1000;
But here it is always showing warnings when the $activity
variable is NULL
even though I am checking for empty. I am running this inside a loop and it is always showing undefined index
when $activity
has null value.