[wp-trac] [WordPress Trac] #46148: Error Countable | Post-Template

WordPress Trac noreply at wordpress.org
Wed Jan 30 14:03:27 UTC 2019


#46148: Error Countable | Post-Template
-------------------------------+------------------------------
 Reporter:  alex0902           |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:  trunk
 Severity:  normal             |  Resolution:
 Keywords:  good-first-bug     |     Focuses:
-------------------------------+------------------------------
Changes (by ayeshrajans):

 * keywords:   => good-first-bug
 * severity:  major => normal


Comment:

 Hi @alex0902 - Welcome to WordPress Trac!
 WordPress ships with a polyfill for the `is_countable` function that PHP
 7.3 natively provides. This means all WordPress users, regardless of the
 PHP version, can now use the `is_countable()` function.

 Although arrays are the most common thing that we call `count()` on, it's
 not the only data type. Any objects whose class implements `\Countable`
 interface are countable.

 If you would like to get to the code contributions to WordPress, this
 could be a good one to get started with!

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


More information about the wp-trac mailing list