Fixed bugs + testing
This commit is contained in:
@ -12,13 +12,13 @@ abstract class AbstractResponse extends BaseAbstractResponse
|
||||
public function __construct(RequestInterface $request, $data)
|
||||
{
|
||||
parent::__construct($request, $data);
|
||||
if (!$this->data->success) {
|
||||
$this->error = (string) $this->data->error;
|
||||
if (!$this->data['success']) {
|
||||
$this->error = (string) $this->data['error'];
|
||||
}
|
||||
}
|
||||
|
||||
public function getError()
|
||||
{
|
||||
return $this->error;
|
||||
return $this['error'];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user