Tag Info

Hot answers tagged


It looks like your $categories is an empty array. To solve this always check if the array is empty or not. In line 117 add code to check if array is empty <?php if( !empty( $categories ) ){ ?> and in line number 167 replace <?php } ?> with <?php } } ?> If you want to permanently remove any error or warning message you can use the ...


Ok, I've narrowed this down. Always check if_user_logged_in() before constructing a new WP_User from the current user's ID. Simply put, don't call: new WP_User(0); or you'll get the warning above.

Only top voted, non community-wiki answers of a minimum length are eligible