summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Cocaro <martin.cocaro@gmail.com>2015-06-18 11:29:01 -0700
committerMartin Cocaro <martin.cocaro@gmail.com>2015-06-18 11:29:01 -0700
commit37feebff87f6f7e9f3f358c0451c7bf776d1e34a (patch)
treee782f6ededd959cefef92e7dc466559e93ea25e6
parentabc1f5bdd199d20c2c1f63894bafabb85cb0b19f (diff)
downloadphp-jwt-37feebff87f6f7e9f3f358c0451c7bf776d1e34a.zip
php-jwt-37feebff87f6f7e9f3f358c0451c7bf776d1e34a.tar.gz
php-jwt-37feebff87f6f7e9f3f358c0451c7bf776d1e34a.tar.bz2
Reversing array merge to avoid overwrites of default headers
-rw-r--r--Authentication/JWT.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/Authentication/JWT.php b/Authentication/JWT.php
index 8791000..161424b 100644
--- a/Authentication/JWT.php
+++ b/Authentication/JWT.php
@@ -132,7 +132,7 @@ class JWT
$header['kid'] = $keyId;
}
if ( isset($head) && is_array($head) ) {
- $header = array_merge($header, $head);
+ $header = array_merge($head, $header);
}
$segments = array();
$segments[] = JWT::urlsafeB64Encode(JWT::jsonEncode($header));