Skip to content

Commit d19489b

Browse files
committed
Fix infinite loop in TXT record export under PHP 8.0
Cause identified and fix provided by @nhulsch Resolves: #183
1 parent fb591d7 commit d19489b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ public static function bind9_format($content, $type, $zonename) {
361361
case 'TXT':
362362
$content = self::decode($content, $type, $zonename);
363363
$split = array();
364-
while($content !== false) {
364+
while(mb_strlen($content) != 0) {
365365
// Using mb_strcut to ensure that multi-byte characters are not cut in half
366366
// (mb_substr would give 255 chars instead of 255 bytes)
367367
$split[] = mb_strcut($content, 0, 255);

0 commit comments

Comments
 (0)