|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-05-06 11:48 UTC] redaction at nuxwin dot com
Description:
------------
HI all,
When I apply a one trim callback via filter, I get an erroneous result on the display.
Sorry , i'm french...
Reproduce code:
---------------
$_SERVER['REMOTE_ADDR'] = ' 80.10.20.30 ';
$remote_addr_list = explode(',', $_SERVER['REMOTE_ADDR']);
filter_var_array(array('remote_addr_list' => $remote_addr_list),
array('remote_addr_list' => array('filter' => FILTER_CALLBACK, 'options' => 'trim','flags'=> FILTER_REQUIRE_ARRAY|FILTER_FORCE_ARRAY)));
I has this result :
echo '<pre>';
print_r($remote_addr_list);
echo '</pre>';
Expected result:
----------------
Array
(
[0] => 80.10.20.30
)
Actual result:
--------------
Array
(
[0] => ���)������
)
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 01:00:02 2025 UTC |
excuse, : Actual result: <pre>Array ( [0] => ���)������ ) </pre>