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 php code error_reporting(0);. Pase this in top of your functions.php file.
Additionally open wp-config.php file and check for WP_DEBUG. It must be false;
define( 'WP_DEBUG', false );
Related Posts:
- WP_DEBUG is not set, but I’m still getting warnings
- WordPress Errors in generated by theme check plugin [closed]
- What is causing this error? “Warning: Invalid argument”
- Getting Warnings & Notices from Fresh WordPress 3.1.2 install
- Removing warnings and notices from production servers
- Deprecated: Function get_magic_quotes_gpc() is deprecated in WordPress that causes height change in hoe slider, all Tabs on website
- Warning(unlink) Warning: session_start() Warning: Cannot modify header information
- Error: Warning: strpos() in media.php
- Warning: : DOMDocument::loadHTML(): Empty string supplied as input in functions.php when adding classes to post images
- Getting notices on fresh 3.6.1 install
- Getting php_network_getaddress error : No such host is known?
- class-wp-hook.php on line 288
- wp warning declaration compatible [closed]
- Website Warning: call_user_func_array() expects parameter 1 to be a valid callback, class ‘Wppr_Public’ does not have a method ‘amp_support’
- Warning on my WordPress site [closed]
- Weird string offset errors when displaying post attachments
- Warning: spl_autoload() [function.spl-autoload] (Term Menu Order)
- How to resolve Warning: Missing argument 2 for ufwp_widget_text ()
- Plugin showing error
- Warning: call_user_func_array() [function.call-user-func-array]
- Error: Attempt to read property “ID” on null
- What’s the warning on line 736?
- Unknown file php5fcgi.core
- A more elegant way to handle notices/warnings
- Cannot modify header information when I try my site with www
- warnings & errors after MAMP to live (hosteurope)
- “Warning: call_user_func_array() [function.call-user-func-array]:” above comments form [closed]
- Attempt to read property “ID” on null”
- Warning when author has no post
- Lots of warnings and errors instead of my WordPress site – Synology NAS – Intranet
- Please Help Me, How to Fix PHP Error Undefined Array Key “srcset”
- Core error when calling remove_menu_page
- PHP Warning: Undefined array key “HTTP_REFERER”
- libpng warning: iCCP: known incorrect sRGB profile
- Error: Declaration of MyClass::start_lvl() should be compatible with that of Walker_Nav_Menu::start_lvl()
- Unable to locate WordPress Content directory (wp-content)
- Upgrading PHP version results in “Use of undefined constant WP_CONTENT_DIR” warning?
- Unwanted redirect in admin area
- How do I set up Debugging?
- Fatal error: Call to undefined function wpsc_cart_item_count()
- Functions.php reverted to new one
- ‘Invalid post type’ error when importing from one site to another
- PHP notice coming from the WordPress core?
- Getting a 404 error when clicking edit page
- Call to undefined function get_userdata in user.php
- Only Homepage not loading properly
- PHP Fatal error: Call to a member function get() on null in /wp-includes/cache.php on line 123
- Call to undefined function wp_embed_register_handler()
- Site works fine, but editing page causes error “Call to undefined function _wp_array_get()” in Gutenberg
- Odd error on top of my dashboard. How do I fix it?
- Trouble Migrating all data blog from WordPress.com to WordPress.org
- Regarding “Insert query error” in wordpress
- “Cannot modify header information” means I can’t use wp_redirect
- Help With Warning on creating new Post types?
- WordPress debug messages not displaying
- How to end a while loop when used in a fetch assoc function [closed]
- javascript variable to wordpress php variable
- Block Update Profile Errors
- What might be the reason of Couldn’t fetch mysqli_result on another domain?
- Theme Check errors of theme code
- Problem after updating plugins
- Angular not defined [closed]
- contact form 7 database short codes [closed]
- Undefined index: ratings_score …/wp-postratings.php on line 994
- Is there any way to pass messages from a script to a redirect target in a hidden fashion?
- Error activating certain plugins
- Failed to import “File name”: Invalid post type jetpack-portfolio
- Error establishing a database connection in wordpress site , website not opening
- Featured Images most often doesnt appear
- Error 500 when installing WordPress
- Fatal error login WordPress [duplicate]
- WPGut – Updating failed and shortcode?
- Warning: call_user_func_array()
- I imported an restore an database and It shows #1067 – Invalid default value for ‘user_registered’
- “File not found.” appears often while navigating wp-admin
- Unable to access wordpress page
- WordPress critical error on wp-admin page with 100% permissions
- WordPress Error blank page In section website
- Error establishing a database connection after moving local wordpressmultisite from one directory to another
- Posts, pages and some images are deleted sometimes
- Call to undefined function wordpress listing_categories
- Fatal error: Call to undefined function wp_add_privacy_policy_content() in /wp-admin/includes/misc.php on line 1822
- Is there a way to search for a missing endif?
- Warning: Illegal string offset – on homepage
- style.min.css code issue
- Why would adding a template file to a child theme cause an error in template-loader.php?
- Unable to customize themes in wordpress after migrating to https from http
- WP default file upload hook not working if used in a plugin
- WordPress slow pages/post, hangs and white text
- Overcome illegal characters [duplicate]
- strange parse error when including a loop template within another template
- WordPress Customer Reviews Error: Line 239?
- undefined index [closed]
- “Parse error: syntax error, unexpected” and the WordPress Theme Editor no longer working!
- Front end user registration form [closed]
- Is it possible to empty debug.log programmatically?
- File doesn’t exist! in wordpress function.php file while creating new post or page
- How to setup an automatic redirect for when there has been a critical error on the site?
- How to hook into debug.log?
- Adding a new custom post type using the editor causes 502 bad gateway error