首页 > 其他分享 >laravel9 dcatadmin laravel-admin laravel.EMERGENCY: Unable to create configured logger. Using emerge

laravel9 dcatadmin laravel-admin laravel.EMERGENCY: Unable to create configured logger. Using emerge

时间:2022-10-21 21:55:52浏览次数:53  
标签:laravel laravel9 string admin item path logger

问题

laravel9使用dcatadmin或者laravel-admin出现问题

laravel.EMERGENCY: Unable to create configured logger. Using emergency logger

解决方法

// 文件 /vendor/dcat/laravel-admin/src/Support/helpers.php 431行
// ltrim 函数参数前增加(string)

if (! function_exists('admin_extension_path')) {
    /**
     * @param  string|null  $path
     * @return string
     */
    function admin_extension_path(?string $path = null)
    {
        $dir = rtrim(config('admin.extension.dir'), '/') ?: base_path('dcat-admin-extensions');

        $path = ltrim((string)$path, '/');

        return $path ? $dir.'/'.$path : $dir;
    }
}

// 文件 /vendor/dcat/laravel-admin/src/Support/Helper.php 842行
// htmlentities 函数内参数增加(string)
public static function htmlEntityEncode($item)
{
        if (is_object($item)) {
            return $item;
        }
        if (is_array($item)) {
            array_walk_recursive($item, function (&$value) {
                $value = htmlentities($value);
            });
        } else {
            $item = htmlentities((string)$item);
        }

        return $item;
}

标签:laravel,laravel9,string,admin,item,path,logger
From: https://www.cnblogs.com/aguai1/p/16814904.html

相关文章