WordPress.org

Make WordPress Core

Ticket #43312: 43312.tests.patch

File 43312.tests.patch, 619 bytes (added by soulseekah, 20 months ago)

Errors (false does not implement Countable) on PHP 7.2 without 43312.patch, passes with patch

  • tests/phpunit/tests/kses.php

    diff --git tests/phpunit/tests/kses.php tests/phpunit/tests/kses.php
    index 1a30797..e74e274 100644
    EOF; 
    722722
    723723                $this->assertEquals( "<{$element} title=\"foo\">", wp_kses_attr( $element, $attribute, array( 'foo' => array( 'title' => true ) ), array() ) );
    724724        }
     725
     726        /**
     727         * @ticket 43312
     728         */
     729        function test_wp_kses_attr_allowed_uncountable() {
     730                $element   = 'foo';
     731                $attribute = 'title="foo" class="bar"';
     732
     733                $this->assertEquals( "<{$element}>", wp_kses_attr( $element, $attribute, array( 'foo' => false ), array() ) );
     734        }
    725735}