Edit report at https://bugs.php.net/bug.php?id=55211&edit=1
ID: 55211
Patch added by: larue...@php.net
Reported by:suman dot madavapeddi at gmail dot com
Summary:ArrayObject::getArrayObject ()
Status: Verified
Type: Bug
Package:SPL related
Operating System: windows 7 Professional
PHP Version:5.3.6
Block user comment: N
Private report: N
New Comment:
The following patch has been added/updated:
Patch Name: getarraycopy-skip-object-protected-private-properties
Revision: 1311575639
URL:
https://bugs.php.net/patch-display.php?bug=55211&patch=getarraycopy-skip-object-protected-private-properties&revision=1311575639
Previous Comments:
[2011-07-24 04:17:05] larue...@php.net
The following patch has been added/updated:
Patch Name: getarraycopy-skip-protected-and-private
Revision: 1311481025
URL:
https://bugs.php.net/patch-display.php?bug=55211&patch=getarraycopy-skip-protected-and-private&revision=1311481025
[2011-07-14 20:46:31] suman dot madavapeddi at gmail dot com
Description:
---
>From manual page: http://www.php.net/arrayobject.getarraycopy%23Description
---
when it is referred to an object it should return only public properties of an
object .But, Instead it is returning all the Properties of an Object
Test script:
---
class MyClass{
public $pbvar = "public Variable";
private $prvar = "Private Variable";
protected $pdvar = "Protected Variable";
}
$ar = new ArrayObject( new MyClass());
$arc = $ar->getArrayCopy();
print_r($arc);
Expected result:
Array
(
[pbvar] => public Variable
)
Actual result:
--
Array
(
[pbvar] => public Variable
[MyClass5prvar] => Private Variable
[*pdvar] => Protected Variable
)
--
Edit this bug report at https://bugs.php.net/bug.php?id=55211&edit=1