From: Operating system: Windows Vista 32bit PHP version: 5.3.13 Package: XML related Bug Type: Bug Bug description:LibXMLError Object property 'message' contains LF at the end of string
Description: ------------ --- >From manual page: http://www.php.net/manual/pl/function.libxml-get-last-error.php --- Tested on PHP 5.3.0, Apache 2.2.11 LibXMLError Object property 'message' contains LF (ASCII 10) at the end of string. Makes it harder to compare error messages that should be ignored or assign translation strings. Test script: --------------- libxml_use_internal_errors(true); // Define xml string that contains known error $vcard = new SimpleXMLElement("<vCard xmlns='vcard-temp'></vcard>"); // Retrieve last LibXMLError object $last_error = libxml_get_last_error(); // Should be true var_dump($last_error->message == "xmlns: URI vcard-temp is not absolute"); // Workaround var_dump(trim($last_error->message) == "xmlns: URI vcard-temp is not absolute"); Expected result: ---------------- bool(true) bool(true) Actual result: -------------- bool(false) bool(true) -- Edit bug report at https://bugs.php.net/bug.php?id=61979&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61979&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61979&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61979&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=61979&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61979&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=61979&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=61979&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=61979&r=needscript Try newer version: https://bugs.php.net/fix.php?id=61979&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=61979&r=support Expected behavior: https://bugs.php.net/fix.php?id=61979&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=61979&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=61979&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=61979&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61979&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=61979&r=dst IIS Stability: https://bugs.php.net/fix.php?id=61979&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=61979&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=61979&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=61979&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=61979&r=mysqlcfg