Re: Manage Membergroups fatal error on Members.subs.php
Reply #1 –
One of the stupid error of mines...
Instead of this:
foreach ($query_conditions as $condition => $query_condition)
{
if ($query_condition == 'member_names')
$query_parts[$condition === 'or' ? 'or' : 'and'] = $allowed_conditions[$query_condition]($query_params);
else
$query_parts[$condition === 'or' ? 'or' : 'and'] = isset($allowed_conditions[$query_condition]) ? $allowed_conditions[$query_condition] : $query_condition;
}
}
elseif ($query == 'member_names')
$query_parts[$condition === 'or' ? 'or' : 'and'] = $allowed_conditions[$query]($query_params);
else
$query_parts['and'] = isset($allowed_conditions[$query]) ? $allowed_conditions[$query] : $query;
}
try this:
foreach ($query_conditions as $condition => $query_condition)
{
if ($query_condition == 'member_names')
$query_parts[$condition === 'or' ? 'or' : 'and'][] = $allowed_conditions[$query_condition]($query_params);
else
$query_parts[$condition === 'or' ? 'or' : 'and'][] = isset($allowed_conditions[$query_condition]) ? $allowed_conditions[$query_condition] : $query_condition;
}
}
elseif ($query == 'member_names')
$query_parts[$condition === 'or' ? 'or' : 'and'][] = $allowed_conditions[$query]($query_params);
else
$query_parts['and'][] = isset($allowed_conditions[$query]) ? $allowed_conditions[$query] : $query;
}
There are two blocks of code to replace!
If it works, I pushed the fix here:
https://github.com/emanuele45/Dialogo/commit/e2640745814340050c7024d5ab2d1d76b088b94f