add missing validation for TextareaRows

fix warning in FormDisplay while importing settings
This commit is contained in:
Crack
2010-07-13 23:15:22 +02:00
parent e7dd9a7c67
commit 030abc5114
3 changed files with 5 additions and 5 deletions

View File

@@ -2,7 +2,4 @@ restore cache'ing in phpmyadmin.css.php
make CSS for darkblue_orange
check input escaping, $cfg is no longer safe to use
preference:
- synchronize language, theme ThemeDefault
allow to import ThemeDefault
local storage - autoload?

View File

@@ -130,5 +130,6 @@ $cfg_db['_validators'] = array(
'Servers/1/port' => 'validate_port_number',
'Servers/1/hide_db' => 'validate_regex',
'TextareaCols' => 'validate_positive_number',
'TextareaRows' => 'validate_positive_number',
'TrustedProxies' => 'validate_trusted_proxies');
?>

View File

@@ -528,7 +528,9 @@ class FormDisplay
break;
case 'array':
// eliminate empty values and ensure we have an array
$post_values = explode("\n", $_POST[$key]);
$post_values = is_array($_POST[$key])
? $_POST[$key]
: explode("\n", $_POST[$key]);
$_POST[$key] = array();
foreach ($post_values as $v) {
$v = trim($v);