Skip to content

CURLRequest: Only variables should be passed by reference #434

Description

@matahr

$this->setBody(json_encode($config['json'])); ErrorException: Only variables should be passed by reference

BASEPATH/HTTP/CURLRequest.php at line 678

// JSON
if (isset($config['json']))
{
        // Will be set as the body in `applyBody()`
	$this->setBody(json_encode($config['json']));
	$this->setHeader('Content-Type', 'application/json');
}

BASEPATH/HTTP/Message.php at line 92

/**
 * Sets the body of the current message.
 *
 * @param $data
 *
 * @return Message
 */
public function setBody(&$data)
{
	$this->body = $data;
	return $this;
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions