Skip to content

Commit

Permalink
修复无法使用自定义 Provider 问题 (#12)
Browse files Browse the repository at this point in the history
使用自定义 Provider 时,因 initialDrivers 无相应的 key,会报 Undefined index 错误
  • Loading branch information
xjchengo authored and overtrue committed Jun 2, 2016
1 parent 14e7647 commit 7acf12b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/SocialiteManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ public function driver($driver = null)
*/
protected function createDriver($driver)
{
if ($provider = $this->initialDrivers[$driver]) {
if (isset($this->initialDrivers[$driver])) {
$provider = $this->initialDrivers[$driver];
$provider = __NAMESPACE__.'\\Providers\\'.$provider.'Provider';

return $this->buildProvider($provider, $this->formatConfig($this->config->get($driver)));
Expand Down

0 comments on commit 7acf12b

Please sign in to comment.