Skip to content

Commit

Permalink
Fix getReadPreferenceTags() when no tag sets are defined
Browse files Browse the repository at this point in the history
  • Loading branch information
jmikola committed Apr 3, 2013
1 parent 03acde1 commit 6ecf9c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Command/AbstractCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,6 @@ protected function getReadPreferenceTags()
{
$readPreference = $this->mongo->getReadPreference();

return $readPreference['tagsets'];
return empty($readPreference['tagsets']) ? array() : $readPreference['tagsets'];
}
}

0 comments on commit 6ecf9c3

Please sign in to comment.