Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xChangeLog3
-rw-r--r--libraries/display_tbl.lib.php8
-rw-r--r--libraries/export/htmlword.php8
-rw-r--r--libraries/export/latex.php8
-rw-r--r--libraries/ip_allow_deny.lib.php4
-rw-r--r--libraries/transformations.lib.php2
-rw-r--r--libraries/transformations/text_plain__external.inc.php2
-rw-r--r--pdf_schema.php2
8 files changed, 20 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index b887b0365a..f46ff5a2eb 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,9 @@ $Source$
* libraries/common.lib.php, /display_tbl.lib.php, /functions.js, /grab_globals.lib.php:
patch #1257955 for bug #1248577 (incorrect message "you should define a primary key")
and bug #1253125 (request URI too large), thanks to Sebastian Mendel
+ * (many files): patch #1253465, avoid error messages for unset variables
+ in PHP functions that require a parameter passed by reference,
+ thanks to Sebastian Mendel
2005-08-12 Marc Delisle <lem9@users.sourceforge.net>
* header.inc.php: remove the 'InnoDB free' segment from table comments
diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php
index c30b6bc986..507c44a84d 100644
--- a/libraries/display_tbl.lib.php
+++ b/libraries/display_tbl.lib.php
@@ -96,7 +96,7 @@ function PMA_setDisplayMode(&$the_disp_mode, &$the_total)
// 2.2 Statement is a "SHOW..."
else if ($GLOBALS['is_show']) {
// 2.2.1 TODO : defines edit/delete links depending on show statement
- $tmp = preg_match('@^SHOW[[:space:]]+(VARIABLES|(FULL[[:space:]]+)?PROCESSLIST|STATUS|TABLE|GRANTS|CREATE|LOGS|DATABASES|FIELDS)@i', $GLOBALS['sql_query'], $which);
+ $tmp = preg_match('@^SHOW[[:space:]]+(VARIABLES|(FULL[[:space:]]+)?PROCESSLIST|STATUS|TABLE|GRANTS|CREATE|LOGS|DATABASES|FIELDS)@i', $GLOBALS['sql_query'], $which = array() );
if (isset($which[1]) && strpos(' ' . strtoupper($which[1]), 'PROCESSLIST') > 0) {
$do_display['edit_lnk'] = 'nn'; // no edit link
$do_display['del_lnk'] = 'kp'; // "kill process" type edit link
@@ -474,7 +474,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
$sort_expression = trim(str_replace(' ', ' ',$analyzed_sql[0]['order_by_clause']));
// Get rid of ASC|DESC (TODO: analyzer)
- preg_match('@(.*)([[:space:]]*(ASC|DESC))@si',$sort_expression,$matches);
+ preg_match('@(.*)([[:space:]]*(ASC|DESC))@si',$sort_expression,$matches = array());
$sort_expression_nodir = isset($matches[1]) ? trim($matches[1]) : $sort_expression;
// sorting by indexes, only if it makes sense (only one table ref)
@@ -753,7 +753,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
// FROM `PMA_relation` AS `1` , `PMA_relation` AS `2`
if (($is_join
- && !preg_match('~([^[:space:],]|`[^`]`)[[:space:]]+(as[[:space:]]+)?' . $fields_meta[$i]->name . '~i', $select_expr, $parts))
+ && !preg_match('~([^[:space:],]|`[^`]`)[[:space:]]+(as[[:space:]]+)?' . $fields_meta[$i]->name . '~i', $select_expr, $parts = array()))
|| ( isset($analyzed_sql[0]['select_expr'][$i]['expr'])
&& isset($analyzed_sql[0]['select_expr'][$i]['column'])
&& $analyzed_sql[0]['select_expr'][$i]['expr'] !=
@@ -807,7 +807,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
$order_img = ' <img src="' . $GLOBALS['pmaThemeImage'] . 's_asc.png" border="0" width="11" height="9" alt="'. $GLOBALS['strAscending'] . '" title="'. $GLOBALS['strAscending'] . '" id="soimg' . $i . '" />';
}
- if (preg_match('@(.*)([[:space:]](LIMIT (.*)|PROCEDURE (.*)|FOR UPDATE|LOCK IN SHARE MODE))@i', $unsorted_sql_query, $regs3)) {
+ if (preg_match('@(.*)([[:space:]](LIMIT (.*)|PROCEDURE (.*)|FOR UPDATE|LOCK IN SHARE MODE))@i', $unsorted_sql_query, $regs3 = array())) {
$sorted_sql_query = $regs3[1] . $sort_order . $regs3[2];
} else {
$sorted_sql_query = $unsorted_sql_query . $sort_order;
diff --git a/libraries/export/htmlword.php b/libraries/export/htmlword.php
index a78dd517ed..8c0063dcf8 100644
--- a/libraries/export/htmlword.php
+++ b/libraries/export/htmlword.php
@@ -226,7 +226,7 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
$type = $row['Type'];
// reformat mysql query output - staybyte - 9. June 2001
// loic1: set or enum types: slashes single quotes inside options
- if (eregi('^(set|enum)\((.+)\)$', $type, $tmp)) {
+ if (eregi('^(set|enum)\((.+)\)$', $type, $tmp = array())) {
$tmp[2] = substr(ereg_replace('([^,])\'\'', '\\1\\\'', ',' . $tmp[2]), 1);
$type = $tmp[1] . '(' . str_replace(',', ', ', $tmp[2]) . ')';
$type_nowrap = '';
@@ -243,9 +243,9 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
$type = '&nbsp;';
}
- $binary = eregi('BINARY', $row['Type'], $test);
- $unsigned = eregi('UNSIGNED', $row['Type'], $test);
- $zerofill = eregi('ZEROFILL', $row['Type'], $test);
+ $binary = eregi('BINARY', $row['Type'], $test = array());
+ $unsigned = eregi('UNSIGNED', $row['Type'], $test = array());
+ $zerofill = eregi('ZEROFILL', $row['Type'], $test = array());
}
$strAttribute = '&nbsp;';
if ($binary) {
diff --git a/libraries/export/latex.php b/libraries/export/latex.php
index 393656b095..f3321ce087 100644
--- a/libraries/export/latex.php
+++ b/libraries/export/latex.php
@@ -315,7 +315,7 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
$type = $row['Type'];
// reformat mysql query output - staybyte - 9. June 2001
// loic1: set or enum types: slashes single quotes inside options
- if (eregi('^(set|enum)\((.+)\)$', $type, $tmp)) {
+ if (eregi('^(set|enum)\((.+)\)$', $type, $tmp = array())) {
$tmp[2] = substr(ereg_replace('([^,])\'\'', '\\1\\\'', ',' . $tmp[2]), 1);
$type = $tmp[1] . '(' . str_replace(',', ', ', $tmp[2]) . ')';
$type_nowrap = '';
@@ -332,9 +332,9 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
$type = '&nbsp;';
}
- $binary = eregi('BINARY', $row['Type'], $test);
- $unsigned = eregi('UNSIGNED', $row['Type'], $test);
- $zerofill = eregi('ZEROFILL', $row['Type'], $test);
+ $binary = eregi('BINARY', $row['Type'], $test = array());
+ $unsigned = eregi('UNSIGNED', $row['Type'], $test = array());
+ $zerofill = eregi('ZEROFILL', $row['Type'], $test = array());
}
$strAttribute = '&nbsp;';
if ($binary) {
diff --git a/libraries/ip_allow_deny.lib.php b/libraries/ip_allow_deny.lib.php
index a3baae1166..91ab22195f 100644
--- a/libraries/ip_allow_deny.lib.php
+++ b/libraries/ip_allow_deny.lib.php
@@ -139,7 +139,7 @@ function PMA_getIp()
// True IP without proxy
return $direct_ip;
} else {
- $is_ip = preg_match('|^([0-9]{1,3}\.){3,3}[0-9]{1,3}|', $proxy_ip, $regs);
+ $is_ip = preg_match('|^([0-9]{1,3}\.){3,3}[0-9]{1,3}|', $proxy_ip, $regs = array());
if ($is_ip && (count($regs) > 0)) {
// True IP behind a proxy
return $regs[0];
@@ -177,7 +177,7 @@ function PMA_ipMaskTest($testRange, $ipToTest)
{
$result = TRUE;
- if (preg_match('|([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/([0-9]+)|', $testRange, $regs)) {
+ if (preg_match('|([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/([0-9]+)|', $testRange, $regs = array())) {
// performs a mask match
$ipl = ip2long($ipToTest);
$rangel = ip2long($regs[1] . '.' . $regs[2] . '.' . $regs[3] . '.' . $regs[4]);
diff --git a/libraries/transformations.lib.php b/libraries/transformations.lib.php
index f2706edde3..516b707b44 100644
--- a/libraries/transformations.lib.php
+++ b/libraries/transformations.lib.php
@@ -50,7 +50,7 @@ function PMA_getAvailableMIMEtypes() {
@ksort($filestack);
foreach ($filestack AS $key => $file) {
- if (preg_match('|^.*__.*\.inc\.php(3?)$|', trim($file), $match)) {
+ if (preg_match('|^.*__.*\.inc\.php(3?)$|', trim($file), $match = array())) {
// File contains transformation functions.
$base = explode('__', str_replace('.inc.php' . $match[1], '', $file));
diff --git a/libraries/transformations/text_plain__external.inc.php b/libraries/transformations/text_plain__external.inc.php
index b0520245ed..983047ad9a 100644
--- a/libraries/transformations/text_plain__external.inc.php
+++ b/libraries/transformations/text_plain__external.inc.php
@@ -67,7 +67,7 @@ function PMA_transformation_text_plain__external($buffer, $options = array(), $m
0 => array("pipe", "r"),
1 => array("pipe", "w")
);
- $process = proc_open($program . ' ' . $poptions, $descriptorspec, $pipes);
+ $process = proc_open($program . ' ' . $poptions, $descriptorspec, $pipes = array());
if (is_resource($process)) {
fwrite($pipes[0], $buffer);
fclose($pipes[0]);
diff --git a/pdf_schema.php b/pdf_schema.php
index 038f23b61d..fd749b5e8b 100644
--- a/pdf_schema.php
+++ b/pdf_schema.php
@@ -1439,7 +1439,7 @@ function PMA_RT_DOC($alltables ){
$type = $row['Type'];
// reformat mysql query output - staybyte - 9. June 2001
// loic1: set or enum types: slashes single quotes inside options
- if (preg_match('@^(set|enum)\((.+)\)$@i', $type, $tmp)) {
+ if (preg_match('@^(set|enum)\((.+)\)$@i', $type, $tmp = array())) {
$tmp[2] = substr(preg_replace("@([^,])''@", "\\1\\'", ',' . $tmp[2]), 1);
$type = $tmp[1] . '(' . str_replace(',', ', ', $tmp[2]) . ')';
$type_nowrap = '';