public function postIndex(){
$url = new Url('https://www.dropbox.com/1/oauth2/authorize');
$url->query->setData([
'response_type'=>'code',
'client_id'=> env('DROPBOX_APP_KEY'),
'redirect_uri'=> env('DROPBOX_REDIRECT_URI')
]);
parse_str defined in the purl class takes only one parameter
protected function doInitialize()
{
parse_str($this->query);
$this->data = get_defined_vars();
}
My current php version is 7.1.17.It needs a second 'result' parameter, how should I pass the second required parameter to get rid of this error
Thanks in advance.
According to the documentation, parse_str
didn't start raising a deprecation warning until 7.2, but in any case, it makes sense to move over to the two-argument usage.
That code sample is thankfully very straightforward, and can easily be updated as follows:
protected function doInitialize()
{
parse_str($this->query, $this->data);
}
The jwage/purl
library already had basically this exact fix applied, but it doesn't look like it's been re-tagged since then so if you pulled it in via Composer you'll need to manually require the master branch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With