修复获取器空键名报错

This commit is contained in:
技术老胡 2024-12-11 15:28:32 +08:00
parent 55fd7f9335
commit b5d128d6b4
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ class PayAccount extends BaseModel
foreach ($payplugin_config as $config) { foreach ($payplugin_config as $config) {
$option[$config['platform']] = $config['name']; $option[$config['platform']] = $config['name'];
} }
return $option[$value]; return isset($option[$value]) ? $option[$value] : '[已卸载,请停用]';
} }
public function getPatternAttr($value) public function getPatternAttr($value)
{ {

View File

@ -23,7 +23,7 @@ class ImgCaptcha
return $captcha; return $captcha;
} }
// 请求外部资源 // 请求外部资源
private function getHttpResponse($url, $header = [], $post = null, $timeout = 10) private static function getHttpResponse($url, $header = [], $post = null, $timeout = 10)
{ {
$ch = curl_init($url); $ch = curl_init($url);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);