Files
wordpress/wp-includes/block-supports
dmsnell c7d7d6e40c Block Supports: Avoid throwing warning when checking for class attribute as string.
When encountering HTML tags with boolean or missing tags, the get_attribute() method in the HTML API returns true and null, respectively. If these returned values are sent directly into string comparison functions then as of PHP 8.0 they will throw E_DEPRECATED errors.

In this patch, block supports is enhanced to check that the class value is a string before it performs string operations on it.

Also in this patch: using `assertEqualHTML()` in background support test instead of `assertSame()`

Developed in https://github.com/WordPress/wordpress-develop/pull/5486
Discussed in https://core.trac.wordpress.org/ticket/59622

Props dmsnell, jonsurrell, hellofromtonya, peterwilsoncc.
Fixes #59622.

Built from https://develop.svn.wordpress.org/trunk@60727


git-svn-id: http://core.svn.wordpress.org/trunk@60063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-09-10 20:27:32 +00:00
..