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”
- call_user_func_array() expects parameter 1 to be a valid callback, class ‘Automattic\Jetpack\Extensions\Contact_Form\Contact_Form_Block’ not found
- numpy division with RuntimeWarning: invalid value encountered in double_scalars
- numpy division with RuntimeWarning: invalid value encountered in double_scalars
- How to use _CRT_SECURE_NO_WARNINGS
- “Notice: Undefined variable”, “Notice: Undefined index”, and “Notice: Undefined offset” using PHP
- C pointers and arrays: [Warning] assignment makes pointer from integer without a cast
- RuntimeWarning: invalid value encountered in double_scalars – without numpy
- “Notice: Undefined variable”, “Notice: Undefined index”, and “Notice: Undefined offset” using PHP
- What does “control reaches end of non-void function” mean?
- libpng warning: iCCP: known incorrect sRGB profile
- warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
- Warning message: line appears to contain embedded nulls [duplicate]
- Illegal string offset Warning PHP
- Illegal string offset Warning PHP
- Illegal string offset Warning PHP
- Illegal string offset Warning PHP
- libpng warning: iCCP: known incorrect sRGB profile
- Variable warning set but not used
- Data truncated for column?
- Avoid passing null as the view root (need to resolve layout parameters on the inflated layout’s root element)
- RuntimeWarning: overflow encountered in ubyte_scalars
- Warning: Found conflicts between different versions of the same dependent assembly
- mean, nanmean and warning: Mean of empty slice
- ERROR: Control may reach end of non-void function /
- Warning : overflow in implicit constant conversion
- Warning: X may be used uninitialized in this function
- Remove warning messages in PHP
- Troubleshooting “The type parameter T is hiding the type T” warning
- What does “warning: not all control paths return a value” mean? (C++)
- Cannot access non-wordpress subdirectories as wordpress overrides them with a 404 error
- Add validation and error handling when saving custom fields?
- wp_enqueue_script was called incorrectly
- Showing errors with $wpdb update
- How to catch/what to do with a WP Error Object
- Change login error messages
- Remove type attribute from script and style tags added by WordPress
- An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration
- Error: Declaration of MyClass::start_lvl() should be compatible with that of Walker_Nav_Menu::start_lvl()
- How to disable the fatal error (WSOD) protection?
- Why $wpdb->show_errors() and print_error() is showing an output even if the query output is correct?
- No Error Log File, no debug info
- Get error messages when $wpdb->insert() returns false?
- Detecting errors generated by $wpdb->get_results()
- Should I use spl_autoload_register() in my plugin?
- Error Warning: Declaration of description_walker::start_el after PHP upgrade [duplicate]
- What are the best practices for updating?
- Error “Trying to get property of non-object” with Custom Walker for wp_nav_menu
- ‘Password field is empty’ error when using autofill in Chrome
- Is there a plugin that will override the “Error establishing a database connection” message? [closed]
- PHP Warning on fresh install (Connection timed out)
- Error: call_user_func_array() expects parameter 1 to be a valid callback
- WP-CLI – Selecting PHP version
- error_log() output for print_r() appearing on page
- How should one implement add_settings_error on custom menu pages?
- How to eliminate weird 404 errors in wp-admin?
- Undefined offset: 0 in > […] /wp-includes/capabilities.php on line 1067
- Why do I get the timeout warning?
- Loading external page template and enqueue script from plugin causes 403 forbidden error
- Unable to locate WordPress Content directory (wp-content)
- When to use Exceptions vs Error Objects vs just plain false/null
- Could not create directory /wp-content/upgrade/
- Validation error: Extending Gutenberg gallery block
- Getting the warning: Missing argument 2 for manage_posts_custom_column()?
- Customize WordPress>Error Page
- Setting 404 page in Nginx
- What log files does a WordPress installation write to?
- Suppress deprecated notices