Bug #72472 [Com]: xml_parse rejects 'tag'
| From: | jim dot michaels at jesusnjim dot com | Date: | Wed, 29 Jun 2016 02:33:46 +0000 |
| Subject: | Bug #72472 [Com]: xml_parse rejects 'tag' | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-201896@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=72472&edit=1
ID: 72472
Comment by: jim dot michaels at jesusnjim dot com
Reported by: jim dot michaels at Jesusnjim dot com
Summary: xml_parse rejects 'tag'
Status: Open
Type: Bug
Package: XML related
Operating System: vista32,pae amd
PHP Version: 7.1.0alpha1
Block user comment: N
Private report: N
New Comment:
the line with the problem is
debugOut($thisFile, "printbreadcrumbsmenu", '',$elem, $iIndexArray);
Previous Comments:
------------------------------------------------------------------------
[2016-06-29 02:29:19] jim dot michaels at Jesusnjim dot com
come again?
------------------------------------------------------------------------
[2016-06-23 02:59:12] requinix@php.net
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.
That looks like a regular PHP error message. Put your code into an editor that supports syntax
highlighting and see if it spots any problems.
------------------------------------------------------------------------
[2016-06-23 01:33:48] jim dot michaels at Jesusnjim dot com
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 this bug report at https://bugs.php.net/bug.php?id=72472&edit=1