[wp-trac] [WordPress Trac] #46660: PHP Warning: count()

WordPress Trac noreply at wordpress.org
Tue Mar 26 16:07:33 UTC 2019


#46660: PHP Warning:  count()
--------------------------+-----------------------------
 Reporter:  betimademi    |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 i have updated to the latest wordpress and php 7.3 but somehow i get this
 error over and over again

 PHP Warning:  count(): Parameter must be an array or an object that
 implements Countable in /srv/users/.../apps/.../public/wp-
 includes/meta.php on line 210:

 // Compare existing value to new value if no prev value given and the key
 exists only once.
         if ( empty( $prev_value ) ) {
                 $old_value = get_metadata( $meta_type, $object_id,
 $meta_key );
                 if ( count( $old_value ) == 1 ) {
                         if ( $old_value[0] === $meta_value ) {
                                 return false;
                         }
                 }
         }

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46660>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list