Fix a problem based on logs: Illegal string offset 'message'

This commit is contained in:
Dillon
2023-06-01 21:20:27 +08:00
parent 619ebc7269
commit cf09d3db9d
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ class Helper
* @return array
*/
static function debugLoggerForPerfexCRM($log){
if($log){
if($log && isset($log['message'])){
$message = $log['message'];
$substring = 'No data were found';
if (isset($message)) {
+2 -1
View File
@@ -65,7 +65,8 @@ class UpdatePerfexCRMInvoice implements ShouldQueue
$invoiceId = $result->payload['id'];
} else {
// Log::error(json_encode('UpdatePerfexCRMInvoice CreatePerfexCRMInvoiceProcessor failed'));
Helper::debugLoggerForPerfexCRM('UpdatePerfexCRMInvoice CreatePerfexCRMInvoiceProcessor failed');
$log['message'] = 'UpdatePerfexCRMInvoice CreatePerfexCRMInvoiceProcessor failed';
Helper::debugLoggerForPerfexCRM($log);
}
}
else{