PHP error with user field search box (global variable with wrong case)

PHP error with user field search box (global variable with wrong case)

by Matt Long -
Number of replies: 0

Hi,

Testing out the plugin (version 2.3.9) on a WAMP server with Moodle 2.9, I was getting a whitescreen/PHP error when trying to add a User Field Search Box filter:

PHP Fatal error:  Call to a member function get_columns() on a non-object in C:\Moodle\blocks\configurable_reports\components\filters\fsearchuserfield\form.php on line 41

Here's line 41 from that file:

$columns = $remoteDB->get_columns('user');

After doing some comparison, I noticed that the $remoteDB global is actually $remotedb in the other filter form.php files. Switching the three instances of the variable to all lowercase ($remotedb) in the fsearchuserfield/form.php file seemed to fix the problem.

HTH,

Matt

Average of ratings: -