php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31046 Segmentation fault on simplexml_load_string
Submitted: 2004-12-09 23:34 UTC Modified: 2004-12-09 23:58 UTC
From: rbro at hotmail dot com Assigned:
Status: Not a bug Package: SimpleXML related
PHP Version: 5CVS-2004-12-09 (dev) OS: Linux
Private report: No CVE-ID: None
 [2004-12-09 23:34 UTC] rbro at hotmail dot com
Description:
------------
This is related to bug 31045 which I just reported, but it's a slightly different scenario and result here.  If I compare the result of simplexml_load_string in an 'if' statement, I'm getting a segmentation fault.  The same thing happens on simplexml_load_file.

Reproduce code:
---------------
<?php
if (($doc = simplexml_load_string('<xml></xml>')) == false)
{
	echo 'equals false';
}
else
{
	echo 'does not equal false';
}
?>


Expected result:
----------------
does not equal false

Actual result:
--------------
Segmentation fault

Patches

serialNo (last revision 2014-04-29 13:20 UTC by mavismokou at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-09 23:51 UTC] fmk@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.


 [2004-12-09 23:58 UTC] rbro at hotmail dot com
Which bug number is that?  I only see one open SimpleXML bug which doesn't describe this problem.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Oct 02 11:05:54 2022 UTC