Edit report at https://bugs.php.net/bug.php?id=51245&edit=1

 ID:               51245
 Updated by:       [email protected]
 Reported by:      a dot dorn at sitesol dot de
 Summary:          Bug in filter_var with SimpleXMLElement
-Status:           Feedback
+Status:           No Feedback
 Type:             Bug
 Package:          Unknown/Other Function
 Operating System: WIN
 PHP Version:      5.2.13

 New Comment:

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


Previous Comments:
------------------------------------------------------------------------
[2010-03-09 13:19:35] a dot dorn at sitesol dot de

@[email protected]

please se my posts 

[2010-03-09 10:59 UTC] a dot dorn at sitesol dot de
no bug in 5.3.2

[2010-03-09 11:02 UTC] a dot dorn at sitesol dot de
example script


As my problem has been only occured with SimpleXMLElement object, please use 
(!!!) simple xml to reproduce the bug. 

My example script (three lines) again (with <?php ?>):

:-)

<?php
$xmlstring = '<?xml version="1.0" encoding="iso-8859-1"?'.'><file 
ext="png"><user id="XXX"/></file>';
$xml = simplexml_load_string($xmlstring);
echo var_dump(filter_var($xml["ext"], FILTER_SANITIZE_STRING));
?>

------------------------------------------------------------------------
[2010-03-09 13:05:28] [email protected]

Did you try with 5.3.2 as well?

Also please provide a script without using simplexml as it is unrelated to this 
problem, if any.

------------------------------------------------------------------------
[2010-03-09 13:04:10] [email protected]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.



------------------------------------------------------------------------
[2010-03-09 13:02:34] a dot dorn at sitesol dot de

Here is the small script:

$xmlstring = '<?xml version="1.0" encoding="iso-8859-1"?'.'><file ext="png">
    <user id="XXX"/>
</file>';

$xml = simplexml_load_string($xmlstring);

echo var_dump(filter_var($xml["ext"], FILTER_SANITIZE_STRING));

------------------------------------------------------------------------
[2010-03-09 12:59:47] a dot dorn at sitesol dot de

the behavior in php 5.3.2 is the expected

string(3) "png"

:-)

will you offer a bugfix for php version 5.2.x?

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=51245


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=51245&edit=1

Reply via email to