Created
May 20, 2014 14:38
Escape "@" in Guzzle body values
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Fix: cURL/Guzzle body parameters may not start with @, see: https://bugs.php.net/bug.php?id=50060 | |
foreach ($body as $key => $value) { | |
if (is_string($value) && substr($value, 0, 1) == '@') { | |
$body[$key] = ' ' . $value; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment