作者 lyh

gx

@@ -446,10 +446,9 @@ class NewsLogic extends BaseLogic @@ -446,10 +446,9 @@ class NewsLogic extends BaseLogic
446 $category_ids = explode(',',trim($newsInfo['category_id'],',')); 446 $category_ids = explode(',',trim($newsInfo['category_id'],','));
447 $category_ids_arr = array_values(array_unique(array_merge($category_ids,$this->param['category_id']))); 447 $category_ids_arr = array_values(array_unique(array_merge($category_ids,$this->param['category_id'])));
448 $category_ids_str = ','.implode(',',$category_ids_arr).','; 448 $category_ids_str = ','.implode(',',$category_ids_arr).',';
449 - @file_put_contents(storage_path('logs/lyh_error.log'), var_export( DB::connection()->enableQueryLog();, true) . PHP_EOL, FILE_APPEND); 449 + @file_put_contents(storage_path('logs/lyh_error.log'), var_export( DB::connection()->enableQueryLog(), true) . PHP_EOL, FILE_APPEND);
450 $rs = $this->model->edit(['category_id'=>$category_ids_str],['id'=>$id]); 450 $rs = $this->model->edit(['category_id'=>$category_ids_str],['id'=>$id]);
451 @file_put_contents(storage_path('logs/lyh_error.log'), var_export(DB::getQueryLog(), true) . PHP_EOL, FILE_APPEND); 451 @file_put_contents(storage_path('logs/lyh_error.log'), var_export(DB::getQueryLog(), true) . PHP_EOL, FILE_APPEND);
452 -  
453 } 452 }
454 } 453 }
455 }catch (\Exception $e){ 454 }catch (\Exception $e){