在我的本地服务器中收到此错误。但是此代码在线运行 它没有显示任何错误。现在我该怎么办?错误显示为空(count($ leadcount))此条件
if(empty(count($leadcount))){
if(!empty($leadManagements)){
$LeadSend = $this->LeadSend->newEntity();
$inqData['requirement_id'] = $Requirements->id;
$inqData['lead_management_id'] = $leadManagements->id;
$inqData['send_date'] = Time::createFromFormat('Y-m-d', date('Y-m-d'));
$inqData['lead_type'] = 'booking';
$inqData['is_active'] = 1;
$inqData['is_delete'] = 1;
$LeadSend = $this->LeadSend->patchEntity($LeadSend, $inqData);
if($this->LeadSend->save($LeadSend)){
$expression = new QueryExpression('booking_lead_count = booking_lead_count + 1');
$expression2 = new QueryExpression('lead_sent_count = lead_sent_count + 1');
$this->LeadManagements->updateAll([$expression,$expression2], ['id' => $leadManagements->id]);
//lead_type send_date
$this->notificationBuyer($this->request->data);
$this->notificationSeller($this->request->data);
}
}
} else {
/// allready send inquery
}
答案 0 :(得分:1)
当然应该只是if(empty($leadcount))
或if(count($leadcount) == 0)
。