debug
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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'];
|
||||
|
||||
Reference in New Issue
Block a user