Skip to content

Commit

Permalink
Force $count to be integer
Browse files Browse the repository at this point in the history
See #4, hattip grappler
  • Loading branch information
GaryJones committed Feb 17, 2014
1 parent 64d0a41 commit a0a4a04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion class-gamajo-dashboard-glancer.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ protected function unset_invalid_post_types( array $post_types ) {
*/
protected function get_single_item( array $item ) {
$num_posts = wp_count_posts( $item['type'] );
$count = $num_posts->$item['status'];
$count = (int) $num_posts->$item['status'];

if ( ! $count ) {
return '';
Expand Down

0 comments on commit a0a4a04

Please sign in to comment.