TypeError thrown

Return value of S_Handler::get_current_section() must be an instance of S_Section, bool returned