Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000585 [Quercus] minor always 12-27-05 15:41 08-25-08 11:27
Reporter creich View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.2.1 Product Version
  Product Build
Summary 0000585: private not hidden...
Description <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd"> [^]
<html xmlns="http://www.w3.org/1999/xhtml"> [^]
<head></head>
<body>
<?php

class ParentClass {
  function parentMethod() {
    echo "Hi Parent
";
  }
}

class ChildClass extends ParentClass{
  private $privateVar;
  public $publicVar;

  function childMethod() {
    echo "Hi Child
";
  }
}
$foo = new ChildClass();

$foo->parentMethod();
$foo->childMethod();

$foo->publicVar = "Goodbye";

echo $foo->publicVar."
";

$foo->privateVar = "Private";

echo $foo->privateVar."
";

ParentClass::parentMethod();

?>
</body>
</html>

Should output:

Hi Parent
Hi Child
Goodbye

Fatal error: Cannot access private property ChildClass::$privateVar...

Instead outputs:

Hi Parent
Hi Child
Goodbye
Private
Hi Parent
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0003352)
ferg
08-25-08 11:27

php/091k, php/391k
 

- Issue History
Date Modified Username Field Change
12-27-05 15:41 creich New Issue
08-25-08 11:27 ferg Note Added: 0003352
08-25-08 11:27 ferg Assigned To  => ferg
08-25-08 11:27 ferg Status new => closed
08-25-08 11:27 ferg Resolution open => fixed
08-25-08 11:27 ferg Fixed in Version  => 3.2.1
08-25-08 11:27 ferg View Status @0@ => public


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker