Method yii\authclient\BaseOAuth::mergeCurlOptions() advanced to merge array values

This commit is contained in:
Klimov Paul
2014-07-11 12:30:30 +03:00
parent fbce722d85
commit a1a9d9a3bc

View File

@@ -223,7 +223,11 @@ abstract class BaseOAuth extends BaseClient implements ClientInterface
while (!empty($args)) {
$next = array_shift($args);
foreach ($next as $k => $v) {
$res[$k] = $v;
if (is_array($v) && !empty($res[$k]) && is_array($res[$k])) {
$res[$k] = array_merge($res[$k], $v);
} else {
$res[$k] = $v;
}
}
}