title: PHP 7.2 Count error
body: <blockquote>
    <p>Warning: count(): Parameter must be an array or an object that
    implements Countable in...</p>
  </blockquote>
  
  <p>I'm getting the above error on the following line.</p>
  
  <pre><code>if (0 &gt;= count($this-&gt;xprop))
  </code></pre>
  
  <p>Can someone help me understand this? I'm fairly new to PHP. The issue is obviously with <code>$this-&gt;xprop</code> not being an array. It wasn't an issue before I upgraded to PHP 7.2. How can I get around this? Are code with warnings still being executed or is this going to cause execution to fail?</p>
  
  <p>I've tried to follow the second answer on <a href="https://stackoverflow.com/questions/50667333/php-7-2-count-function-is-not-working">here</a> with no luck. The accepted answer is not acceptable to me as it is more of a hack.</p>