Skip to content
Browse files

Fix unsafe array operation.

Fix unsafe array operation inOAuthApplication->createSignatureBase
flagged by Travis: Only variables should be passed by reference.
Store the output of explode in a temporary variable and pass that
variable into array_shift.
  • Loading branch information...
1 parent 1f249cd commit 43f15134bc49b92a3a6a743aee124f901f13cc31 @bkorty bkorty committed Dec 31, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 aweber_api/oauth_application.php
View
3 aweber_api/oauth_application.php
@@ -374,7 +374,8 @@ public function createSignatureBase($method, $url, $data) {
$method = $this->encode(strtoupper($method));
$query = parse_url($url, PHP_URL_QUERY);
if ($query) {
- $url = array_shift(explode('?', $url, 2));
+ $parts = explode('?', $url, 2);
+ $url = array_shift($parts);
$items = explode('&', $query);
foreach ($items as $item) {
list($key, $value) = explode('=', $item);

0 comments on commit 43f1513

Please sign in to comment.
Something went wrong with that request. Please try again.