Your message dated Fri, 8 Jan 2010 16:03:24 +0100
with message-id <[email protected]>
and subject line Bug fixed in current stable
has caused the Debian Bug report #463255,
regarding php5: Reflection object fails to recognise runtime class properties
as public
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
463255: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=463255
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: php5
Version: 5.2.0-8+etch10
Severity: important
According to a friend, the code below works correctly on PHP 5.2.3 but in the
current Debian stable distribuion it fails to produce the right result. Note
that the
myRuntimeProperty is absent from the second var_dump at the end.
<?php
class Test
{
public $myDeclaredProperty = 1;
public function __construct()
{
$this->myRuntimeProperty = 2;
}
public function getPublicProperties()
{
$r = new ReflectionObject($this);
$properties = $r->getProperties();
$publicProperties = array();
foreach ($properties as $property) {
if ($property->isPublic()) {
$publicProperties[$property->getName()] =
$property->getValue($this);
}
}
return $publicProperties;
}
}
echo 'Running ' . phpversion() . "\n";
$obj = new Test();
echo "Dumping object:\n";
var_dump($obj);
echo "Dumping public properties according to Reflection object\n";
var_dump($obj->getPublicProperties());
My output:
Running 5.2.0-8+etch10
Dumping object:
object(Test)#1 (2) {
["myDeclaredProperty"]=>
int(1)
["myRuntimeProperty"]=>
int(2)
}
Dumping public properties according to Reflection object
array(1) {
["myDeclaredProperty"]=>
int(1)
}
-- System Information:
Debian Release: 4.0
APT prefers stable
APT policy: (1001, 'stable')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-5-amd64
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Versions of packages php5 depends on:
ii libapache2-mod-php5 5.2.0-8+etch10 server-side, HTML-embedded scripti
ii php5-common 5.2.0-8+etch10 Common files for packages built fr
php5 recommends no packages.
-- no debconf information
--- End Message ---
--- Begin Message ---
Version: 5.2.6.dfsg.1-1+lenny4
Hi,
I am closing this bug report since it applies to version in oldstable
which is no longer supported. According to bugreport code in question
works fine in newer versions of php5.
Ondrej
--
Ondřej Surý <[email protected]>
http://blog.rfc1925.org/
--- End Message ---