Skip to content

Commit

Permalink
GH-38 - GH-38 - creating BrowserDetector fails when located in vendor
Browse files Browse the repository at this point in the history
- fix
  • Loading branch information
serhiime committed Jul 15, 2019
1 parent 884893c commit 1690c96
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Detector.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,13 @@ public function getPatternList($list, $type)
*/
protected function init()
{
$dataProvider = $this->options['dataProvider'];
$dataProvider = new $this->options['dataProvider']();

/** @var StorageInterface $dataProvider */
$dataProvider = new $dataProvider();
$dataProvider->setDataDirectory($this->findDataDirectory());
$dataProvider->setCacheDirectory($this->findCacheDirectory());
$dataProvider->setCacheEnabled(true);
$this->setDataProvider($dataProvider);
$this->dataProvider->setDataDirectory($this->findDataDirectory());
$this->dataProvider->setCacheDirectory($this->findCacheDirectory());
$this->dataProvider->setCacheEnabled(true);
$this->setDataProvider($dataProvider);
}

Expand Down

0 comments on commit 1690c96

Please sign in to comment.