Lines 171 to 180

$epdlanguage_query = ep_4_query("SELECT languages_id, name FROM ".TABLE_LANGUAGES." WHERE code = '".DEFAULT_LANGUAGE."'");
$epdlanguage_query->store_result();
if (($ep_uses_mysqli ? mysqli_num_rows($epdlanguage_query) : mysql_num_rows($epdlanguage_query))) {
$epdlanguage = ($ep_uses_mysqli ? mysqli_fetch_array($epdlanguage_query) : mysql_fetch_array($epdlanguage_query));
$epdlanguage_id = $epdlanguage['languages_id'];
$epdlanguage_name = $epdlanguage['name'];
} else {
//exit("EP4 FATAL ERROR: No default language set."); // this should never happen
exit("EP4 FATAL ERROR: No default language set. Table: ".TABLE_LANGUAGES." Code: ".DEFAULT_LANGUAGE." is set" ); // this should never happen
}

Quote Originally Posted by mc12345678 View Post
Ami correct that the three lines read:

Code:
$epdlanguage_query = ep_4_query("SELECT languages_id, name FROM ".TABLE_LANGUAGES." WHERE code = '".DEFAULT_LANGUAGE."'");
$epdlanguage_query->store_result();
if (($ep_uses_mysqli ? mysqli_num_rows($epdlanguage_query) : mysql_num_rows($epdlanguage_query))) {
In that sequence?

Here's what I have found regarding the way this has gone. Prior to the use of mysqli_, it seems that although possible, not as frequent that the returned data would be unbuffered and therefore when a function such as num_rows was called, the value returned would either be 0 (unbuffered) or the number of rows that actually exist(ed). It appears that the two reported occurrences of this have been more of the result of the return of zero rows even though the data could be enumerated. I have two alternative tests I'm working on for you to try which may need to happen in the functions file or in the main base file. The above error list is similar to what I observed when updating EP4 to work under ZC 1.5.3. Though I want to be sure that the above code is in the correct sequence before continuing down that alternative path. Also, wanted to verify that the test(s) that were requested in the original notification of this problem were also run with equivalent results. (Ie, verification that performing the sql query in myphpadmin had a successful result.)

Some of the next "solution" is to identify in how many places the additional "correction" would be needed. I thought that the num_rows function was only used the one time and all other actions were based on straight forward pull and check type routines, not necessarily a "hey how many" type call.