Project

Profile

Help

Bug #6341

closed

PHP parseXmlFromFile terminate called after throwing an instance of 'SaxonApiException'

Added by O'Neil Delpratt 10 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Category:
PHP API
Start date:
2024-02-09
Due date:
% Done:

100%

Estimated time:
Applies to branch:
Fix Committed on Branch:
12
Fixed in Maintenance Release:
Found in version:
12.4.2
Fixed in version:
12.5
SaxonC Languages:
SaxonC Platforms:
SaxonC Architecture:

Description

Exceptions thrown in the C++ parse XML methods are not being properly handled in PHP. Therefore users cannot use try catch blocks to recover from failures. If the following fails to find the file books.xml

$input = self::$saxonProc->parseXmlFromFile("data/books.xml");

PHP script crashes as follows:

terminate called after throwing an instance of 'SaxonApiException'
  what():  std::exception
Aborted (core dumped)
Actions #1

Updated by O'Neil Delpratt 10 months ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Bug fixed and committed to repository. Affected methods:

  • parseXmlFromFile
  • parseXmlFromString

Tests added to PHPunit tests.

Actions #2

Updated by O'Neil Delpratt 5 months ago

  • Status changed from Resolved to Closed
  • Fixed in version set to 12.5

Bug fix applied in the Saxon 12.5 Maintenance release.

Actions #3

Updated by Community Admin 5 months ago

  • Fix Committed on Branch 12 added

Please register to edit this issue

Also available in: Atom PDF