Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

PHP Warning: Parameter must be an array or an object that implements Countable #659

Closed
slaFFik opened this issue Nov 23, 2018 · 4 comments
Closed
Labels
bug Something isn't working
Milestone

Comments

@slaFFik
Copy link

slaFFik commented Nov 23, 2018

[23-Nov-2018 11:21:04 UTC] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in ...\wordpress\trunk\wp-content\themes\twentynineteen\header.php on line 37

I'm on WordPress Nightly Build, 5.0-RC1-43944.

@joshfeck
Copy link
Contributor

This error can be replicated:

  • on a server with PHP 7.2
  • by viewing a standard WP post that has a featured image set
  • where WP_DEBUG is set to true

@glueckpress
Copy link

I left a comment in your PR, @joshfeck. 🙂

@kjellr
Copy link
Collaborator

kjellr commented Nov 28, 2018

Just noting that #679 is also open as a solution to this problem.

@kjellr kjellr added the bug Something isn't working label Nov 28, 2018
@kjellr kjellr added this to the 5.0 milestone Nov 28, 2018
@garretthyder
Copy link

I took a look at #661 compared to #679 and feel 661 is overkill which the count function can simply be removed as the value is already numeric. Also 679 reduces characters as it appends the class. Cheers

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants