|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51482 PhD_IDE generates invalid XML
Submitted: 2010-04-05 17:38 UTC Modified: 2010-04-07 04:34 UTC
From: Assigned: moacir (profile)
Status: Closed Package: Doc Build problem
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
New email:
PHP Version: OS:


 [2010-04-05 17:38 UTC]
The IDE package generates invalid XML, as it appears to convert entities it 
shouldn't. In this case, &lt to < thus invalidating the XML file.

The following test script is based off the IDE demo.

Test script:
#!/usr/bin/env php
use phpdotnet\phd as PhD;

define ('__INSTALLDIR__', '/Users/philip/php/lib/php');
define ('PHD_OUTPUT_DIR', '/Users/philip/svn/php/doc-en/output_dir/');
define('DS',                     DIRECTORY_SEPARATOR);

require __INSTALLDIR__ . DS . 'phpdotnet' . DS . 'phd' . DS . 'Autoloader.php';
require __INSTALLDIR__ . DS . 'phpdotnet' . DS . 'phd' . DS . 'functions.php';

spl_autoload_register(array("phpdotnet\\phd\\Autoloader", "autoload"));

$api = new PhD\Package_IDE_API(PHD_OUTPUT_DIR);

$function = $api->getFunctionByName('strcmp');
print $function->getName();

Expected result:

Actual result:
[08:25:31 - E_WARNING             ] 
simplexml_load_file(): /Users/philip/svn/php/doc-en/output_dir/ide-
functions/strcmp.xml:23: parser error : StartTag: invalid element name

[08:25:31 - E_WARNING             ] 
simplexml_load_file(): <description>Returns < 0 if str1 is less than



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-04-07 04:31 UTC]
Automatic comment from SVN on behalf of moacir
Log: Fixing bug #51482 - PhD_IDE generates invalid XML
+ Added htmlspecialchars in the return of the readContents() function
 [2010-04-07 04:34 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: moacir
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jun 20 17:01:29 2024 UTC