A third option if the first aabove is a no go is to place a line at 991 og the functions file, similar to what was added in line 172 in the main file with the appropriate variable substitution.

This would be something instead of 1 or 2. So suggesting to implement only one of these three at a time for now.

My reasoning behind all this is the following.

The query function is supposed to default to the store option suggested in the first option; however, it is possible that this version of php on the host could have something incorrectly configured/compiled and does not default to that constant. Next is that the constant could be incorrectly assigned and not accounted for in the query function. If so, the first option above won't resolve the issue. The second option above is suggested in the event that the query is coming back with a result, but the num_rows function isn't returning a value until either the result has been completely stepped through, or a result has been tested, so the second modification should identify if the query returned with something because if it did then the language should be assigned in the if statement. If the query comes back with more than one result, well we rent worried about that and justuse the first returned result. The third revision identified in this post is to further account for the reason(s) why the first option was unsuccessful and to force the action of storing the result, but doing so while the result is still in memory, where the previous attempt at line 172 may have been performed when the data was already lost.

Unfortunately, the environment(s) in which this has been tested have not produced the troubled results seen by the two of you.