From 4ef49e85441e21377c6fca4316bb52dcea7a1afb Mon Sep 17 00:00:00 2001 From: Niklas Keller Date: Wed, 14 Jun 2017 08:08:34 +0200 Subject: [PATCH] Fix cache TTL --- lib/DefaultResolver.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/DefaultResolver.php b/lib/DefaultResolver.php index d3495a3..ad39430 100644 --- a/lib/DefaultResolver.php +++ b/lib/DefaultResolver.php @@ -667,9 +667,9 @@ REGEX; $promisor->fail($error); } else { foreach ($result as $type => $records) { - $minttl = INF; + $minttl = \PHP_INT_MAX; foreach ($records as list( , , $ttl)) { - if ($ttl && $minttl > $ttl) { + if ($ttl < $minttl) { $minttl = $ttl; } }