Warning: foreach() argument must be of type array|object, bool given in D:\xampp\htdocs\KGL\wp-content\themes\kgl\template-parts\content\content-annoucements_table.php on line 24

Fatal error: Uncaught TypeError: usort(): Argument #1 ($array) must be of type array, bool given in D:\xampp\htdocs\KGL\wp-content\themes\kgl\template-parts\content\content-annoucements_table.php:53 Stack trace: #0 D:\xampp\htdocs\KGL\wp-content\themes\kgl\template-parts\content\content-annoucements_table.php(53): usort(false, 'date_compare') #1 D:\xampp\htdocs\KGL\wp-includes\template.php(792): require('D:\\xampp\\htdocs...') #2 D:\xampp\htdocs\KGL\wp-includes\template.php(725): load_template('D:\\xampp\\htdocs...', false, Array) #3 D:\xampp\htdocs\KGL\wp-includes\general-template.php(206): locate_template(Array, true, false, Array) #4 D:\xampp\htdocs\KGL\wp-content\themes\kgl\component-template.php(54): get_template_part('template-parts/...', 'annoucements_ta...') #5 D:\xampp\htdocs\KGL\wp-includes\template-loader.php(106): include('D:\\xampp\\htdocs...') #6 D:\xampp\htdocs\KGL\wp-blog-header.php(19): require_once('D:\\xampp\\htdocs...') #7 D:\xampp\htdocs\KGL\index.php(17): require('D:\\xampp\\htdocs...') #8 {main} thrown in D:\xampp\htdocs\KGL\wp-content\themes\kgl\template-parts\content\content-annoucements_table.php on line 53