Updates the variable to stay as a string and not switch from boolean to string

This commit is contained in:
Joshua Estes 2014-07-03 13:48:20 -04:00
parent 5620712a89
commit e8202f1574
1 changed files with 3 additions and 3 deletions

View File

@ -25,18 +25,18 @@ require_once 'bp_options.php';
/** /**
* @param string $url * @param string $url
* @param string $apiKey * @param string $apiKey
* @param bool $post * @param string $post
* *
* @return array * @return array
*/ */
function bpCurl($url, $apiKey, $post = false) function bpCurl($url, $apiKey, $post = null)
{ {
global $bpOptions, $bpconfig; global $bpOptions, $bpconfig;
$curl = curl_init($url); $curl = curl_init($url);
$length = 0; $length = 0;
if ($post) if (null !== $post)
{ {
curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $post); curl_setopt($curl, CURLOPT_POSTFIELDS, $post);