Addendum to Shared Font

Forgot a couple of lines I intended to include.
This commit is contained in:
oleibman
2023-12-18 10:42:17 -08:00
parent 6f84f41ee6
commit 58ea5b5dcf
+7
View File
@@ -713,6 +713,7 @@ class Font
if (file_exists("$startDirectory/$desiredFont")) {
$fontPath = "$startDirectory/$desiredFont";
} else {
$iterations = 0;
$it = new RecursiveDirectoryIterator(
$startDirectory,
RecursiveDirectoryIterator::SKIP_DOTS
@@ -730,6 +731,12 @@ class Font
break;
}
++$iterations;
if ($iterations > 5000) {
// @codeCoverageIgnoreStart
break;
// @codeCoverageIgnoreEnd
}
}
}