aboutsummaryrefslogtreecommitdiffstats
path: root/profile.php
diff options
context:
space:
mode:
authornikrou <nikrou@piwigo.org>2006-02-15 20:44:33 +0000
committernikrou <nikrou@piwigo.org>2006-02-15 20:44:33 +0000
commit2a01c7472a31ef36435ac4ca6022bcdfda149802 (patch)
tree4630ebee8ef4da41fc2e0a57fcd513e424f33141 /profile.php
parent33485fa91b5f4849c4cd3122a8e4a544990f34f1 (diff)
bug 287 fixed: params nb_image_line and nb_line_page must be not null scalar
git-svn-id: http://piwigo.org/svn/trunk@1043 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'profile.php')
-rw-r--r--profile.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/profile.php b/profile.php
index 2aab4c05d..8c4db8fce 100644
--- a/profile.php
+++ b/profile.php
@@ -47,6 +47,17 @@ $errors = array();
if (isset($_POST['validate']))
{
$int_pattern = '/^\d+$/';
+ if (empty($_POST['nb_image_line'])
+ or (!preg_match($int_pattern, $_POST['nb_image_line'])))
+ {
+ array_push($errors, $lang['nb_image_line_error']);
+ }
+
+ if (empty($_POST['nb_line_page'])
+ or (!preg_match($int_pattern, $_POST['nb_line_page'])))
+ {
+ array_push($errors, $lang['nb_line_page_error']);
+ }
if ($_POST['maxwidth'] != ''
and (!preg_match($int_pattern, $_POST['maxwidth'])
@@ -128,13 +139,13 @@ SELECT '.$conf['user_fields']['password'].' AS password
);
$data = array();
- $data{'user_id'} = $_POST['userid'];
+ $data['user_id'] = $_POST['userid'];
foreach ($fields as $field)
{
if (isset($_POST[$field]))
{
- $data{$field} = $_POST[$field];
+ $data[$field] = $_POST[$field];
}
}
mass_updates(USER_INFOS_TABLE,