作者 lyh

gx

@@ -420,6 +420,9 @@ if (!function_exists('getImageUrl')) { @@ -420,6 +420,9 @@ if (!function_exists('getImageUrl')) {
420 * @time :2023/7/20 16:46 420 * @time :2023/7/20 16:46
421 */ 421 */
422 function getImageUrl($path,$location = 1){ 422 function getImageUrl($path,$location = 1){
  423 + if(empty($path)){
  424 + return '';
  425 + }
423 if(is_array($path)){ 426 if(is_array($path)){
424 foreach ($path as $v){ 427 foreach ($path as $v){
425 $url[] = getImageUrl($v); 428 $url[] = getImageUrl($v);
@@ -445,6 +448,9 @@ if (!function_exists('getFileUrl')) { @@ -445,6 +448,9 @@ if (!function_exists('getFileUrl')) {
445 * @time :2023/7/20 16:46 448 * @time :2023/7/20 16:46
446 */ 449 */
447 function getFileUrl($path,$location = 1){ 450 function getFileUrl($path,$location = 1){
  451 + if(empty($path)){
  452 + return '';
  453 + }
448 if(is_array($path)){ 454 if(is_array($path)){
449 foreach ($path as $v){ 455 foreach ($path as $v){
450 $url[] = getFileUrl($v); 456 $url[] = getFileUrl($v);
@@ -29,7 +29,6 @@ class ProcessRecords extends Base @@ -29,7 +29,6 @@ class ProcessRecords extends Base
29 29
30 public function getRecordAttribute($value){ 30 public function getRecordAttribute($value){
31 $value = Arr::s2a($value); 31 $value = Arr::s2a($value);
32 - @file_put_contents(storage_path('logs/lyh_error.log'), var_export($value, true) . PHP_EOL, FILE_APPEND);  
33 foreach ($value as &$v){ 32 foreach ($value as &$v){
34 if(isset($v['image']) && !empty($v['image'])) { 33 if(isset($v['image']) && !empty($v['image'])) {
35 foreach ($v['image'] as $kImage => $vImage) { 34 foreach ($v['image'] as $kImage => $vImage) {