Skip to content

Commit de830fb

Browse files
authored
Bugfixes.
1 parent dbfe3a6 commit de830fb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Client.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ public function __construct($config)
1717
{
1818
$this->config = $config;
1919
$this->company_id = $this->config['company_id'];
20-
$this->checkTokens();
2120
if (function_exists('storage_path')) {
2221
$this->file = storage_path('token.ini');
2322
}
23+
$this->checkTokens();
2424
}
2525

2626
public function checkTokens()
2727
{
2828
try {
2929
$tokens = parse_ini_file($this->file);
3030
} catch (\Exception $e) {
31-
unlink($this->file);
31+
@unlink($this->file);
3232
}
3333

3434
if (! isset($tokens['access_token']) || ! isset($tokens['created_at'])) {

0 commit comments

Comments
 (0)