php8.0 버전 호환 코드 적용 및 PHP 끝 태그 삭제 일괄적용
This commit is contained in:
@ -86,7 +86,7 @@ function social_login_get_provider_adapter( $provider )
|
||||
include_once G5_SOCIAL_LOGIN_PATH . "/Hybrid/Auth.php";
|
||||
}
|
||||
|
||||
if( ! is_object($g5['hybrid_auth']) ){
|
||||
if( ! (isset($g5['hybrid_auth']) && is_object($g5['hybrid_auth'])) ){
|
||||
$setting = social_build_provider_config($provider);
|
||||
$g5['hybrid_auth'] = new Hybrid_Auth( $setting );
|
||||
}
|
||||
@ -121,7 +121,7 @@ function social_before_join_check($url=''){
|
||||
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if( $row['provider'] ){
|
||||
if( isset($row['provider']) && $row['provider'] ){
|
||||
$is_exist = true;
|
||||
|
||||
$time = time() - (86400 * (int) G5_SOCIAL_DELETE_DAY);
|
||||
@ -359,7 +359,7 @@ function social_extends_get_keys($provider){
|
||||
);
|
||||
}
|
||||
|
||||
return $r[$provider];
|
||||
return isset($r[$provider]) ? $r[$provider] : array();
|
||||
}
|
||||
|
||||
function social_escape_request($request){
|
||||
@ -494,7 +494,7 @@ function social_check_login_before($p_service=''){
|
||||
{
|
||||
$get_error = social_get_error_msg( $e->getCode() );
|
||||
|
||||
if( is_object( $adapter ) ){
|
||||
if( isset($adapter) && is_object( $adapter ) ){
|
||||
$adapter->logout();
|
||||
}
|
||||
|
||||
@ -1029,7 +1029,7 @@ function social_get_nonce($key=''){
|
||||
|
||||
$setting = social_build_provider_config($key);
|
||||
try{
|
||||
return sha1($setting['providers'][$key]['secret']);
|
||||
return isset($setting['providers'][$key]['secret']) ? sha1($setting['providers'][$key]['secret']) : '';
|
||||
} catch(Exception $e) {
|
||||
return '';
|
||||
}
|
||||
@ -1060,5 +1060,4 @@ function social_nonce_is_valid( $nonce , $action = '' , $user='' , $provider = '
|
||||
function social_nonce_generate_hash( $action='' , $user='', $provider = '' ){
|
||||
$i = ceil( time() / ( social_get_nonce('d') / 2 ) );
|
||||
return md5( $i . $action . $user . social_get_nonce($provider) );
|
||||
}
|
||||
?>
|
||||
}
|
||||
Reference in New Issue
Block a user