random Uncaught TypeError filter_ensure_valid_filter()

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
bayardk
Posts: 2
Joined: 10 Jul 2017, 21:07

random Uncaught TypeError filter_ensure_valid_filter()

Post by bayardk »

Mantis version 2.5.1 running on XAMPP for Windows 7.1.6 (PHP 7.1.6, MariaDB 10.1.24), Windows NT 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586

I just installed Mantis 2.5.1 and exported/imported my bugtracker database from an older installation of MySQL/PHP/Mantis. Everything seemed great, but then I soon started receiving "uncaught TypeError" messages like this:

Fatal error: Uncaught TypeError: Argument 1 passed to filter_ensure_valid_filter() must be of the type array, null given, called in E:\XAMPP\htdocs\mantisbt\core\filter_api.php on line 965 and defined in E:\XAMPP\htdocs\mantisbt\core\filter_api.php:549 Stack trace: #0 E:\XAMPP\htdocs\mantisbt\core\filter_api.php(965): filter_ensure_valid_filter(NULL) #1 E:\XAMPP\htdocs\mantisbt\core\user_api.php(1399): filter_deserialize('v8#a:43:{s:8:"_...') #2 E:\XAMPP\htdocs\mantisbt\core\current_user_api.php(257): user_get_bug_filter(2, NULL) #3 E:\XAMPP\htdocs\mantisbt\core\filter_api.php(1270): current_user_get_bug_filter() #4 E:\XAMPP\htdocs\mantisbt\core\filter_api.php(1210): filter_get_bug_rows_filter(NULL, NULL) #5 E:\XAMPP\htdocs\mantisbt\view_all_bug_page.php(71): filter_get_bug_rows(1, NULL, NULL, NULL, NULL, NULL, NULL, true) #6 {main} thrown in E:\XAMPP\htdocs\mantisbt\core\filter_api.php on line 549

As I said, it happens randomly as I switch Mantis pages to different views, projects, etc. - seems to happen on almost any click that leads to data output.

Update 7/11/2017: A reduction in randomness (my understanding improved)! I'm seeing this happen when: a) I'm in "View Issues" and switch Projects; b) I'm in "View Issues", I click on the "Hide Status" filter, select "resolved", then click "Apply Filter" below the filters. I can avoid the error when switching projects if I leave View Issues and go to Summary, switch projects, then go back to View Issues. I can't avoid it when changing Hide Status, which makes View Issues useless.

Update 7/12/2017: Last update, will probably delete Mantis in a day or two and switch tools if this remains unresolved. In View Issues, clicking on any column title to sort also throws TypeError:

Fatal error: Uncaught TypeError: Argument 1 passed to filter_ensure_valid_filter() must be of the type array, null given, called in E:\XAMPP\htdocs\mantisbt\core\filter_api.php on line 965 and defined in E:\XAMPP\htdocs\mantisbt\core\filter_api.php:549 Stack trace: #0 E:\XAMPP\htdocs\mantisbt\core\filter_api.php(965): filter_ensure_valid_filter(NULL) #1 E:\XAMPP\htdocs\mantisbt\view_all_set.php(114): filter_deserialize('v8#a:43:{s:16:"...') #2 {main} thrown in E:\XAMPP\htdocs\mantisbt\core\filter_api.php on line 549

A function is being called with a NULL parameter. The two ways I know to accomplish that are: 1) coding mistakes, or 2) missing fields in table (doesn't exist, $row and/or $row-><field name> yields NULL value).
Post Reply