From 5e7ae5779e44d82b5de9f16f5fef04fa0a11e2d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= Date: Wed, 1 May 2002 09:27:07 +0000 Subject: [PATCH] Fixed a warning and a bug with php 3.0.12 thanks to Kris Wood --- ChangeLog | 4 ++++ libraries/common.lib.php3 | 2 +- libraries/grab_globals.lib.php3 | 8 ++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3a6c1af48..50198b6f1 100755 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,10 @@ $Source$ * tbl_properties_options.php3: added labels and beautified display. * db_stats.php3, lines 12-22: ensure this script can only be ran by a super-user. + * libraries/grab_globals.lib.php3: fixed a bug with the "extact()" function + under php 3.0.12 thanks to Kris Wood . + * libraries/common.lib.php3, line 791: fixed a warning thanks to + Kris Wood . 2002-04-30 Loïc Chapeaux * lang/italian.inc.php3: updated thanks to Pietro Danesi. diff --git a/libraries/common.lib.php3 b/libraries/common.lib.php3 index c7bfdcd85..725103212 100644 --- a/libraries/common.lib.php3 +++ b/libraries/common.lib.php3 @@ -788,7 +788,7 @@ if (!defined('PMA_COMMON_LIB_INCLUDED')){ function PMA_countRecords($db, $table, $ret = FALSE) { $result = mysql_query('SELECT COUNT(*) AS num FROM ' . PMA_backquote($db) . '.' . PMA_backquote($table)); - $num = mysql_result($result, 0, 'num'); + $num = ($result) ? mysql_result($result, 0, 'num') : 0; mysql_free_result($result); if ($ret) { return $num; diff --git a/libraries/grab_globals.lib.php3 b/libraries/grab_globals.lib.php3 index 30bfd2b2c..bbbf522bd 100644 --- a/libraries/grab_globals.lib.php3 +++ b/libraries/grab_globals.lib.php3 @@ -13,15 +13,15 @@ if (!defined('PMA_GRAB_GLOBALS_INCLUDED')) { define('PMA_GRAB_GLOBALS_INCLUDED', 1); if (!empty($_GET)) { - extract($_GET); + extract($_GET, EXTR_OVERWRITE); } else if (!empty($HTTP_GET_VARS)) { - extract($HTTP_GET_VARS); + extract($HTTP_GET_VARS, EXTR_OVERWRITE); } // end if if (!empty($_POST)) { - extract($_POST); + extract($_POST, EXTR_OVERWRITE); } else if (!empty($HTTP_POST_VARS)) { - extract($HTTP_POST_VARS); + extract($HTTP_POST_VARS, EXTR_OVERWRITE); } // end if if (!empty($_FILES)) {