Caveat : I am not a PHP guru by any stretch – hopefully someone can explain what this code is doing – why is he applying something to a local variable ($state) and then ignoring it? This code is in the 3.1.1 php sdk and I noticed it when debugging an issue with js sdk and php interactions during an authResponse trigger.
public function __construct($config) {
$this->setAppId($config['appId']);
$this->setApiSecret($config['secret']);
if (isset($config['fileUpload'])) {
$this->setFileUploadSupport($config['fileUpload']);
}
$state = $this->getPersistentData('state');
if (!empty($state)) {
$this->state = $this->getPersistentData('state');
}
}
Is it as simple as he meant to use $this->state = $state?
It’s an oversight on the programmers side I think. He could and should have assigned $state to $this->state.