1
0
mirror of https://github.com/danog/dns.git synced 2024-11-26 20:14:51 +01:00

Fix a precedence issue whee supplying your own ConfigLoader to the BasicResolver resulted in a WindowsConfigLoader being instantiated instead.

This commit is contained in:
Robert Goldsmith 2017-08-09 17:27:17 +01:00 committed by Niklas Keller
parent 44cef3fb53
commit 4005ff4d32

View File

@ -49,9 +49,9 @@ final class BasicResolver implements Resolver {
public function __construct(Cache $cache = null, ConfigLoader $configLoader = null) {
$this->cache = $cache ?? new ArrayCache;
$this->configLoader = $configLoader ?? \stripos(PHP_OS, "win") === 0
$this->configLoader = $configLoader ?? (\stripos(PHP_OS, "win") === 0
? new WindowsConfigLoader
: new UnixConfigLoader;
: new UnixConfigLoader);
$this->questionFactory = new QuestionFactory;