2016-11-25 11 views
-1

ローカルサーバーでこのエラーが発生します。このコードはオンライン で実行されていますが、エラーが表示されません。今私は何ができますか?空のエラー・ショー(カウント($のleadcount))この条件致命的なエラー:cakephpの書き込みコンテキストで関数の戻り値を使用できません3

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

異なるサーバーで問題が発生した場合は、設定を比較し、違いを把握し、これらの詳細を質問に当てはめてください。 – ndm

答えて

1

は、確かにそれは単にif(empty($leadcount))またはif(count($leadcount) == 0)のいずれかでなければなりません。

関連する問題