[wp-trac] [WordPress Trac] #50639: [PHP 8] Add @requires annotations for PHPUnit tests that assert engine-enforced constraints

WordPress Trac noreply at wordpress.org
Wed Sep 16 02:27:58 UTC 2020


#50639: [PHP 8] Add @requires annotations for PHPUnit tests that assert engine-
enforced constraints
------------------------------------------+-----------------------------
 Reporter:  ayeshrajans                   |       Owner:  SergeyBiryukov
     Type:  defect (bug)                  |      Status:  reviewing
 Priority:  normal                        |   Milestone:  5.6
Component:  Build/Test Tools              |     Version:
 Severity:  normal                        |  Resolution:
 Keywords:  php8 has-patch needs-refresh  |     Focuses:
------------------------------------------+-----------------------------

Comment (by SergeyBiryukov):

 In [changeset:"48981" 48981]:
 {{{
 #!CommitTicketReference repository="" revision="48981"
 Code Modernization: Return an empty string from `wpdb::prepare()` if there
 are not enough arguments to match the placeholders.

 This avoids a fatal error on PHP 8 caused by passing mismatched arguments
 to `vsprintf()`, and maintains the current behaviour.

 Follow-up to [48979], [48980].

 See #50913, #50639.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50639#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list