When running the Content check, in DuplicateTitles::calculateScore(), the method calls SafeMarkup::checkPlain() on the row title before using it as an index for the duplicate title registry.

The problem is that SafeMarkup::checkPlain() doesn't return a string it returns an HtmlEscapedText object. This is not a valid array key so an error is generated:

Illegal offset type DuplicateTitles.php:121

SafeMarkup::checkPlain() is deprecated and should be replaced with Html::escape(). Html::escape() returns a string rather than an HtmlEscapedText object so it works the same way as the D7 version of Site Audit.

CommentFileSizeAuthor
#2 illegal_offset_type-2881772-2.patch947 bytesjroberts
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jayroberts created an issue. See original summary.

jroberts’s picture

Here is a patch for the above issue.

  • FluxSauce committed d87d83f on 8.x-2.x authored by jayroberts
    Issue #2881772 by jayroberts: Illegal offset type DuplicateTitles.php:...
FluxSauce’s picture

Assigned: Unassigned » FluxSauce
Status: Active » Fixed

Good catch, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.