Merge branch 'dev'

This commit is contained in:
2025-08-26 14:53:55 +08:00
2 changed files with 10 additions and 4 deletions

View File

@@ -153,8 +153,12 @@ if (!function_exists('get_filesystem_url')) {
* @param string $disk 磁盘配置 key * @param string $disk 磁盘配置 key
* @return string * @return string
*/ */
function get_filesystem_url(string $url, string $disk): string function get_filesystem_url(string|null $url, string $disk): string
{ {
if (is_null($url)) {
return '';
}
if (\think\helper\Str::startsWith($url, ['http://', 'https://', '//'])) { if (\think\helper\Str::startsWith($url, ['http://', 'https://', '//'])) {
return $url; return $url;
} }
@@ -171,8 +175,12 @@ if (!function_exists('url_filesystem_detect')) {
* @param string $url 文件地址 * @param string $url 文件地址
* @return string * @return string
*/ */
function url_filesystem_detect(string $url): string function url_filesystem_detect(string|null $url): string
{ {
if (is_null($url)) {
return '';
}
$idx = strrpos($url, '.'); $idx = strrpos($url, '.');
if ($idx === false) { if ($idx === false) {
return $url; return $url;

View File

@@ -1,2 +0,0 @@
*
!.gitignore