Merge pull request #88 from creative-commoners/pulls/3/htmlvalue

FIX Use HTMLValue::class
This commit is contained in:
Maxime Rainville 2023-01-18 11:31:42 +13:00 committed by GitHub
commit ed04e94c51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -15,6 +15,7 @@ use SilverStripe\ExternalLinks\Tasks\LinkChecker;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\DB;
use SilverStripe\ORM\ValidationException;
use SilverStripe\View\Parsers\HTMLValue;
class CheckExternalLinksTask extends BuildTask
{
@ -181,7 +182,7 @@ class CheckExternalLinksTask extends BuildTask
// Check value of html area
$page = $pageTrack->Page();
$this->log("Checking {$page->Title}");
$htmlValue = Injector::inst()->create('HTMLValue', $page->Content);
$htmlValue = Injector::inst()->create(HTMLValue::class, $page->Content);
if (!$htmlValue->isValid()) {
continue;
}