mirror of
https://github.com/yiisoft/yii2.git
synced 2025-12-01 23:51:12 +08:00
Method yii\authclient\BaseOAuth::mergeCurlOptions() advanced to merge array values
This commit is contained in:
@@ -223,9 +223,13 @@ abstract class BaseOAuth extends BaseClient implements ClientInterface
|
|||||||
while (!empty($args)) {
|
while (!empty($args)) {
|
||||||
$next = array_shift($args);
|
$next = array_shift($args);
|
||||||
foreach ($next as $k => $v) {
|
foreach ($next as $k => $v) {
|
||||||
|
if (is_array($v) && !empty($res[$k]) && is_array($res[$k])) {
|
||||||
|
$res[$k] = array_merge($res[$k], $v);
|
||||||
|
} else {
|
||||||
$res[$k] = $v;
|
$res[$k] = $v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user