Bug #8846

AbstractXmlParserTest dies with a PHP error

Added by Bastian Waidelich over 11 years ago. Updated about 11 years ago.

Status:
Resolved
Priority:
Must have
Assignee:
Category:
I18n
Start date:
2010-07-13
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

The unit test AbstractXmlParserTest::throwsExceptionWhenBadFilenameGiven() dies with following PHP error on my machine (Win 7, PHP 5.3):

C:\[...]\flow3\Packages\Framework\FLOW3\Classes\Locale\Xml\AbstractXmlParser.php:88
Warning: simplexml_load_file() [<a href='function.simplexml-load-file'>function.simplexml-load-file</a>]: I/O warning : failed to load external entity &quot;foo&quot; in C:\[...]\flow3\Packages\Framework\FLOW3\Classes\Locale\Xml\AbstractXmlParser.php line 88

#1

Updated by Karol Gusak over 11 years ago

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

Applied in changeset r4850.

#2

Updated by Bastian Waidelich over 11 years ago

  • Status changed from Resolved to Needs Feedback

Hi Karol,

I'm still getting the PHP Warning in the FLOW3 Testrunner, don't you?
Besides, we're trying to avoid the Error Control Operator (@) in FLOW3 as it's bad practice and error prone.
Instead it might help to check, whether the target filename exists before calling simplexml_load_file().
If that is not enough to prevent the error, you can call most SimpleXML functions with an LIBXML_NOERROR option (see http://de2.php.net/simplexml_load_file)

#3

Updated by Karol Gusak over 11 years ago

  • Status changed from Needs Feedback to Resolved

Applied in changeset r4859.

#4

Updated by Karol Gusak over 11 years ago

Uhm no I'm not getting any warning, maybe a misconfiguration.

Thank you for advices! Also, I saw the Error Control Operator somewhere in the code (can't remember where though).

I hope it is OK now.

#5

Updated by Bastian Waidelich over 11 years ago

Karol Gusak wrote:

Uhm no I'm not getting any warning, maybe a misconfiguration.

Strange. Anyways, it works now for me, thanks!

Also, I saw the Error Control Operator somewhere in the code (can't remember where though).

That's possible.. It's pretty hard to find the occurences via search & replace..
But I've added a ticket #8864 so it might be added to the CGL soon.

#6

Updated by Karsten Dambekalns over 11 years ago

  • Target version set to 1.0 alpha 11

Also available in: Atom PDF