Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

content has protect access in http-foundation/Request #4

Open
moeen-basra opened this issue Jul 14, 2017 · 0 comments
Open

content has protect access in http-foundation/Request #4

moeen-basra opened this issue Jul 14, 2017 · 0 comments

Comments

@moeen-basra
Copy link

moeen-basra commented Jul 14, 2017

In the function below
`public function singleRequest($method, $uri, array $data = [], array $headers = [], $content = null)
{
// Save the current request so we can reset the router back to it
// after we've completed our internal request.
$currentRequest = $this->request->instance()->duplicate();

    dd($currentRequest->content, $currentRequest->getContent());

    $headers = $this->overrideHeaders($currentRequest->server->getHeaders(), $headers);

    if ($this->disableMiddleware) {
        $this->app->instance('middleware.disable', true);
    }

    $response = $this->request($method, $uri, $data, $headers, $content);

    if ($this->disableMiddleware) {
        $this->app->instance('middleware.disable', false);
    }

    // Once the request has completed we reset the currentRequest of the router
    // to match the original request.
    $this->request->instance()->initialize(
        $currentRequest->query->all(),
        $currentRequest->request->all(),
        $currentRequest->attributes->all(),
        $currentRequest->cookies->all(),
        $currentRequest->files->all(),
        $currentRequest->server->all(),
        $currentRequest->content
    );

    return $response;
}`

We may need to change

$currentRequest->content
to
$currentRequest->getContent()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant