Closed JDGrimes closed 6 years ago
It does seem like we should give some kind of error here though. Otherwise, it will fail silently, making debugging a nightmare. And the problem might not even be noticed at all in that case. Of course, a problem like this should never happen in the first place. Yet here we are. (And I still don't know what was causing this issue in the first place.)
I've decided to just fix the fatal error for now, and we'll revisit it further as needed.
I received a report last week about the ranks component giving a fatal error. This was coming from the
WordPoints_Rank_Type::maybe_increase_user_rank()
method, becauseWordPoints_Rank_Types::get_type( $next_rank->type )
. I have not yet determined why the rank type didn't exist in this case, but I think that it makes sense to avoid a fatal error here by adding a sanity check.