Issue #3320371 by Dave Reid, Binoli Lalani: Fixed PHP strlen(): Passing null to parameter #1 ($string) of type string is deprecated in DomHelperTrait.