Bug #72472 [Opn->Fbk]: xml_parse rejects 'tag'

From: Date: Thu, 23 Jun 2016 02:59:15 +0000
Subject: Bug #72472 [Opn->Fbk]: xml_parse rejects 'tag'
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-201805@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
 Updated by:         requinix@php.net
 Reported by:        jim dot michaels at Jesusnjim dot com
 Summary:            xml_parse rejects 'tag'
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            XML related
 Operating System:   vista32,pae amd
 PHP Version:        7.1.0alpha1
 Block user comment: N
 Private report:     N

 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------
[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


Thread (5 messages)

« previous php.bugs (#201805) next »