From:             tonera at gmail dot com
Operating system: windowsxp
PHP version:      5.1.2
PHP Bug Type:     *XML functions
Bug description:  input conversion failed due to input error

Description:
------------
the code is not run at php5. it send a error:
Warning: input conversion failed due to input error in
d:\site\wowdkp\test.php on line 28
and return false.
but it can return (int)1 at php4.
or ,change the words of "gb2312" to "utf-8" .it return 'int(1)'
<?php
/**
+-----------------------------------------------------------------------+
* @autor tonera <tonera at gmail.com>;
* @since 2006-3-3
* @version $Id: test.php,v 1.0 tonera$
* @description  
+-----------------------------------------------------------------------+
*/

$parser = xml_parser_create();

$bb= <<<__EOF__
<?xml version="1.0" encoding="gb2312"?>
<RaidInfo>
<Join>


<key35><player>‚bÖ®´óÕß</player><time>02/21/06 23:56:37</time></key35>
</Join>


</RaidInfo>
__EOF__;

xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING,1);
xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
$rs             = xml_parse_into_struct($parser, $bb, $values, $tags);

var_dump($rs);
?>

Reproduce code:
---------------
$bb= <<<__EOF__
<?xml version="1.0" encoding="gb2312"?>
<RaidInfo>
<Join>


<key35><player>‚bÖ®´óÕß</player><time>02/21/06 23:56:37</time></key35>
</Join>


</RaidInfo>
__EOF__;

Expected result:
----------------
int(1)

Actual result:
--------------
Warning: input conversion failed due to input error in
d:\site\wowdkp\php\module\admin\mod_Admin.php on line 734
int(0)

-- 
Edit bug report at http://bugs.php.net/?id=36843&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=36843&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=36843&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=36843&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=36843&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=36843&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=36843&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=36843&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=36843&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=36843&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=36843&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=36843&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=36843&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=36843&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=36843&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=36843&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=36843&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=36843&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=36843&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=36843&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=36843&r=mysqlcfg

Reply via email to