]> git.entuzijast.net Git - freeradius-dialup-admin.git/commitdiff
Fix a small problem with debugging
authorkkalev <kkalev>
Mon, 13 Jan 2003 08:01:43 +0000 (08:01 +0000)
committerkkalev <kkalev>
Mon, 13 Jan 2003 08:01:43 +0000 (08:01 +0000)
Changelog
lib/sql/drivers/mysql/functions.php3
lib/sql/drivers/pg/functions.php3

index ffefbe754079bcd36de9f85277efd5011d45a421..f0c0dfba6b4b725d74571821cc904653639ea878 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -31,6 +31,7 @@ Ver 1.62:
 * Don't include user_info.php3 in the user_test page.
 * Make things a little bit more simple in lib/ldap/change_attrs.php3
 * Fix a small bug in lib/ldap/create_user.php3. Unset the mod array before adding any values to it.
+* Fix a small problem with debugging
 Ver 1.61:
 * Add a string encoder for greek
 * If general_decode_normal_attributes is set then encode attributes in lib/ldap/change_info. In the near future
index 78fe0a52bada02970ace0a0a99e0514a4b94b631..42ce98b1ad085e3536a61699a561cf4f9ec79c6d 100644 (file)
@@ -41,12 +41,13 @@ function da_sql_num_rows($result,$config)
 
 function da_sql_fetch_array($result,$config)
 {
+       $row = @mysql_fetch_array($result);
        if ($config[sql_debug] == 'true'){
                print "<b>DEBUG(SQL,MYSQL DRIVER): Query Result: ";
-               print_r(@mysql_fetch_array($result));
+               print_r($row);
                print "</b><br>\n";
        }
-       return @mysql_fetch_array($result);
+       return $row;
 }
 
 function da_sql_affected_rows($link,$result,$config)
index 4c5a10b88502f933fa3df5b8d03d9c1f401fcd42..b65e1f380e7a40eeea4a7f729bfe4e981bb048e1 100644 (file)
@@ -43,12 +43,12 @@ function da_sql_num_rows($result,$config)
 
 function da_sql_fetch_array($result,$config)
 {
-       if ($config[sql_debug] == 'true'){
+       $row = @pg_fetch_array($result,$config[tmp_pg_array_num][$result]++,PGSQL_ASSOC);
+       if ($row && $config[sql_debug] == 'true'){
                print "<b>DEBUG(SQL,PG DRIVER): Query Result: ";
-               print_r(@pg_fetch_array($result,$config[tmp_pg_array_num][$result]++,PGSQL_ASSOC));
+               print_r($row);
                print  "</b><br>\n";
        }
-       $row = @pg_fetch_array($result,$config[tmp_pg_array_num][$result]++,PGSQL_ASSOC);
        if (!$row)
                $config[tmp_pg_array_num][$result] = 0;
        return $row;