[wp-trac] [WordPress Trac] #44167: Add is_countable() check to wp-admin/edit.php

WordPress Trac noreply at wordpress.org
Mon May 21 06:55:57 UTC 2018


#44167: Add is_countable() check to wp-admin/edit.php
-----------------------------------------------+---------------------------
 Reporter:  thrijith                           |       Owner:  (none)
     Type:  defect (bug)                       |      Status:  new
 Priority:  normal                             |   Milestone:  Awaiting
                                               |  Review
Component:  General                            |     Version:
 Severity:  normal                             |  Resolution:
 Keywords:  has-patch reporter-feedback close  |     Focuses:
-----------------------------------------------+---------------------------
Changes (by johnbillion):

 * keywords:  has-patch reporter-feedback => has-patch reporter-feedback
               close
 * version:  trunk =>


Comment:

 Thanks for your patch @thrijith.

 I agree with @subrataemfluence. I don't believe this is appropriate use of
 `is_countable()`. If a bug is introduced elsewhere which results in
 `$done` being set to a non-countable value (for example via the return
 value of `bulk_edit_posts()`), it's not a good idea to mask it via logic
 such as this. This is the reason that PHP now triggers warnings when
 attempting to count un-countable values since PHP 7.2.

 See [ticket:44123#comment:11].

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


More information about the wp-trac mailing list