Title: PHP warning
Last modified: December 7, 2018

---

# PHP warning

 *  Resolved [knittingand](https://wordpress.org/support/users/knittingand/)
 * (@knittingand)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/php-warning-177/)
 * The following has shown up in my error logs.
 * > mod_fcgid: stderr: PHP Warning: count(): Parameter must be an array or an object
   > that implements Countable in website-address/plugins/css-javascript-toolbox/
   > framework/events/subjects/hook.subject.php on line 81, referer: a page from
   > my website
 * Is there any way I can fix it?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-warning-177%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Chris](https://wordpress.org/support/users/stchris/)
 * (@stchris)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/php-warning-177/#post-10996840)
 * I got the same issue and the following is just my attempt at a fix so use at 
   your own risk:
 * On PHP7.2+ it should suffice to change:
    /framework/events/subjects/subject.subject.
   php LINE: 70
 * from
    return isset($this->definition[$name]) ? $this->definition[$name] : NULL;
 * to
    return isset($this->definition[$name]) ? $this->definition[$name] : [];
 * At least I get no errors doing this.
    Hope this helps. Kind regards Chris
 *  [Larry Daniele](https://wordpress.org/support/users/larrydaniele/)
 * (@larrydaniele)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/php-warning-177/#post-11104632)
 * Thanks [@stchris](https://wordpress.org/support/users/stchris/). I was seeing
   a flood of these messages in our debug.log file:
 * [18-Jan-2019 13:01:49 UTC] PHP Warning: count(): Parameter must be an array or
   an object that implements Countable in /home/holycowom/public_html/wp-content/
   plugins/css-javascript-toolbox/framework/events/subjects/hook.subject.php on 
   line 81
    [18-Jan-2019 13:01:49 UTC] PHP Warning: count(): Parameter must be an
   array or an object that implements Countable in /home/holycowom/public_html/wp-
   content/plugins/css-javascript-toolbox/framework/events/subjects/hook.subject.
   php on line 82
 * Your tweak stopped the flood. 🙂 I hope this fix makes it into the official code.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PHP warning’ is closed to new replies.

 * ![](https://ps.w.org/css-javascript-toolbox/assets/icon-256x256.gif?rev=3132209)
 * [CSS & JavaScript Toolbox](https://wordpress.org/plugins/css-javascript-toolbox/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/css-javascript-toolbox/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/css-javascript-toolbox/)
 * [Active Topics](https://wordpress.org/support/plugin/css-javascript-toolbox/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/css-javascript-toolbox/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/css-javascript-toolbox/reviews/)

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)

 * 2 replies
 * 3 participants
 * Last reply from: [Larry Daniele](https://wordpress.org/support/users/larrydaniele/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/php-warning-177/#post-11104632)
 * Status: resolved