Changeset 1043 for trunk/profile.php


Ignore:
Timestamp:
Feb 15, 2006, 9:44:33 PM (18 years ago)
Author:
nikrou
Message:

bug 287 fixed: params nb_image_line and nb_line_page must be not null scalar

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/profile.php

    r1036 r1043  
    4848{
    4949  $int_pattern = '/^\d+$/';
     50  if (empty($_POST['nb_image_line'])
     51      or (!preg_match($int_pattern, $_POST['nb_image_line'])))
     52  {
     53    array_push($errors, $lang['nb_image_line_error']);
     54  }
     55
     56  if (empty($_POST['nb_line_page'])
     57      or (!preg_match($int_pattern, $_POST['nb_line_page'])))
     58  {
     59    array_push($errors, $lang['nb_line_page_error']);
     60  }
    5061 
    5162  if ($_POST['maxwidth'] != ''
     
    129140   
    130141    $data = array();
    131     $data{'user_id'} = $_POST['userid'];
     142    $data['user_id'] = $_POST['userid'];
    132143   
    133144    foreach ($fields as $field)
     
    135146      if (isset($_POST[$field]))
    136147      {
    137         $data{$field} = $_POST[$field];
     148        $data[$field] = $_POST[$field];
    138149      }
    139150    }
Note: See TracChangeset for help on using the changeset viewer.