Bug #72472 [NEW]: xml_parse rejects 'tag'
From: jim dot michaels at Jesusnjim dot com
Operating system: vista32,pae amd
PHP version: 7.1.0alpha1
Package: XML related
Bug Type: Bug
Bug description:xml_parse rejects 'tag'
Description:
------------
$contents = @file_get_contents($xmlFile);//for tag content replacement
$parser = xml_parser_create_ns('utf-8',':'); // WORKS JUST FINE
$xmlArray=array();
$tags=array();
global $AcctTypes,$TagTypes,$rootTag;
//this is the list of
$xmlSuccess=xml_parse_into_struct($parser, $contents, $xmlArray,
$tags);
if (0==$StartXmlArrayIndex) {
$StartXmlArrayIndex++;
}
$elem=$xmlArray[$StartXmlArrayIndex];
...
Parse error: syntax error, unexpected 'tag' (T_STRING), expecting ',' or
')' in C:\w\Jesusnjim\menu7a.php on line 472
Test script:
---------------
$contents = @file_get_contents($xmlFile);//for tag content replacement
$parser = xml_parser_create_ns('utf-8',':'); // WORKS JUST FINE
$xmlArray=array();
$tags=array();
global $AcctTypes,$TagTypes,$rootTag;
//this is the list of
$xmlSuccess=xml_parse_into_struct($parser, $contents, $xmlArray,
$tags);
if (0==$StartXmlArrayIndex) {
$StartXmlArrayIndex++;
}
$elem=$xmlArray[$StartXmlArrayIndex];
if (!in_array($elem['tag'],$TagTypes)) {
Expected result:
----------------
running code - sorry, complete example not possible due to 20 lines or
less.
Actual result:
--------------
Parse error: syntax error, unexpected 'tag' (T_STRING), expecting ',' or
')' in C:\w\Jesusnjim\menu7a.php on line 472
--
Edit bug report at https://bugs.php.net/bug.php?id=72472&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72472&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72472&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72472&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=72472&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=72472&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=72472&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=72472&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=72472&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=72472&r=support
Expected behavior: https://bugs.php.net/fix.php?id=72472&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=72472&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=72472&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=72472&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72472&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=72472&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=72472&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=72472&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=72472&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=72472&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=72472&r=mysqlcfg
Thread (5 messages)
- jim dot michaels at Jesusnjim dot com