From: oskar dot mothander at gmail dot com
Operating system: Windows 7 (64)
PHP version: 5.4.19
Package: SimpleXML related
Bug Type: Bug
Bug description:simplexml_load_string does not honor error_reporting settting
Description:
------------
Calling simplexml_load_string() on invalid xml will output Warnings even
though
you've been a good developer and turned these OFF on live environment.
Using "libxml_use_internal_errors(true);" fixes the problem but shouldn't
be
nessesary.
This caused my site to display Warnings live.
Affected versions:
PHP 5.4.3 (not in the list above?)
PHP 5.3.8 (VC9 X86 32bit thread safe) + PEAR
Test script:
---------------
ini_set("display_errors", false);
simplexml_load_string('<apa>');
// Will still output Warnings even though they are off.
Expected result:
----------------
Empty result
Actual result:
--------------
Warning: simplexml_load_string() [function.simplexml-load-string]: Entity:
line 1:
parser error : Premature end of data in tag apa line 1 on line 2
Warning: simplexml_load_string() [function.simplexml-load-string]: <apa> on
line 2
Warning: simplexml_load_string() [function.simplexml-load-string]: ^ on
line 2
--
Edit bug report at https://bugs.php.net/bug.php?id=65705&edit=1
--
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=65705&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=65705&r=trysnapshot53
Try a snapshot (trunk):
https://bugs.php.net/fix.php?id=65705&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=65705&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=65705&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=65705&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=65705&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=65705&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=65705&r=support
Expected behavior: https://bugs.php.net/fix.php?id=65705&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=65705&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=65705&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=65705&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65705&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=65705&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=65705&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=65705&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65705&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=65705&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=65705&r=mysqlcfg