This commit is contained in:
make
2025-11-18 00:30:28 +08:00
parent af0004f6b8
commit cec5928302
3 changed files with 12 additions and 0 deletions

View File

@@ -765,6 +765,7 @@ namespace {
/**
* Undocumented function
* 有个bug 如果传入是中英文结合/纯英文/纯数字,则是返回是空
*
* @param string $strZh
* @return string
@@ -781,6 +782,11 @@ namespace {
$strPinYin = trim((string) $strPinYin);
if (!is_string($strPinYin) || trim($strPinYin) === '') {
return 'k_' . substr(sha1($strZh), 0, 12);
}
return $strPinYin;
}

View File

@@ -67,7 +67,11 @@ class VideoInfoPage extends BasePage
if (empty($this->arrVideo)) {
$arrVideo = json_decode($this->getContent(), true);
// $arrVideo = $arrVideo['list'][0]; // 这个日志会报错
$arrVideo = $arrVideo['list'][0] ?? [];
$arrVideo = $arrVideo['list'][0];
// print_r($arrVideo);
$strPlayUrl = $arrVideo['vod_play_url'];