php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6665 object variables get 'unset' when assigned within xml handlers
Submitted: 2000-09-12 01:06 UTC Modified: 2002-04-27 07:38 UTC
Votes:2
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: igor at ipass dot net Assigned:
Status: Not a bug Package: PEAR related
PHP Version: 4.1.0 OS: Solaris 7 & 8
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: igor at ipass dot net
New email:
PHP Version: OS:

 

 [2000-09-12 01:06 UTC] igor at ipass dot net
<?

require_once "XML/Parser.php";

class __TestParser1 extends XML_Parser {
  var $data;
    function __TestParser1() {
  $this->XML_Parser();
    }
    function startHandler($xp, $element, $attribs) {
    }
    function endHandler($xp, $element) {
    }
    function cdataHandler($xp, $cdata) {
      $this->data=$cdata;
    }
    function defaultHandler($xp, $cdata) {
 
    }
}
$o = new __TestParser1();
$o->parseString("<?xml version='1.0' ?><root>foo</root>", 1);
echo $o->data;  // Should print 'foo', it does not print anything

?>

No php.ini used

EXTRA_LDFLAGS="-Wl,-s" \
CPPFLAGS=$CFLAGS \
./configure \
--with-regex=system \
--enable-shared     \
--enable-track-vars \
--with-config-file-path=/usr/local/etc \
--with-mysql=/usr/local \
--enable-ftp \
--enable-xml \
--with-gd=no \
--with-db2=no \
--with-db3=no \
--with-zlib=no \


Patches

Pull Requests

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Nov 11 01:01:29 2024 UTC