Last array element not found

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

this code fragment give following result in my error log:

foreach($reg_array as $region_item)
  $tmp_reg_array[] = $region_item[0];
$sel_region = explode(',', $_POST[CLIENT_REGION]);
foreach($sel_region as $sel_region_item)
  if(!in_array($sel_region_item, $tmp_reg_array))
  {
    my_error_log("Unknown region: $sel_region_item, region array: ".
                 var_export($tmp_reg_array, TRUE));
    header("Location: ".
      get_error_result(
         $state_def[$_SESSION[STATE_VAR]][STATE_REDIR_PAGE])
    );
    exit;
  }

The result:

[15-Mar-2006 15:29:25] 0# - client.php          :  327:Unknown region: 
38579a8bd51c2d656450bc41360362f39fdc528eca7b98b1c05221c676a0ce278cf30109fa1cd9cb5453fb91242176d83595a509,
region array: array (
  0 =>
'38579a8bd51c2d656450bc41360362f39fdc528eca7b98b1c05221c676a0ce278cf30109fa1cd9cb5453fb91242176d833f01a86',
  1 =>
'38579a8bd51c2d656450bc41360362f39fdc528eca7b98b1c05221c676a0ce278cf30109fa1cd9cb5453fb91242176d8323627c2',
  2 =>
'38579a8bd51c2d656450bc41360362f39fdc528eca7b98b1c05221c676a0ce278cf30109fa1cd9cb5453fb91242176d83595a509',
)

Is it a bug of php ?

Thanks

Rumisek

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux