Project

General

Profile

Actions

Bug #25292

closed

Exception "tx_em_Parser_MirrorXmlPushParser: Unable to create XML parser" when updating extension list

Added by Daniel Minder about 13 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extension Manager
Target version:
-
Start date:
2011-03-09
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

This happens both when clicking on the Retrieve/Update button in the new extension manager and when using the Update Extension List task in T3 4.5.2 (Side note: I had to fix the requireOnce() call in class.tx_em_parser_mirrorxmlabstractparser.php first, but this is already removed in SVN).

In tx_em_Repository_Utility->updateExtList(), isExtListUpdateNecessary() is called which calls getRemoteExtHashFile(). After this fetchExtListFile() is called which calls getRemoteExtListFile(). Both getRemoteExtHashFile() and getRemoteExtListFile() call getMirrors(TRUE) which result in tx_em_Import_MirrorListImporter->getMirrors() and tx_em_Parser_MirrorXmlPushParser->parseXML() calls.

And here is the source of the problem: The XML parser (objXML member) is created in the constructor of the tx_em_Parser_MirrorXmlPushParser class, but freed at the end of the parseXML() method. Therefore, in the second call to parseXML() objXML is not a resource any more and the exception is thrown.

My current solution is to move the following lines from tx_em_Parser_MirrorXmlPushParser __construct() to the beginning of method parseXML():
if ($this->isAvailable()) {
$this->objXML = xml_parser_create();
xml_set_object($this->objXML, $this);
}

(issue imported from #M17906)

Actions

Also available in: Atom PDF