Mantis - Quercus
Viewing Issue Advanced Details
4863 block always 11-21-11 00:48 01-11-14 22:49
ds82  
nam  
normal  
closed 4.0.14  
no change required  
none    
none  
0004863: ReflectionParameter::getClass() returns null
Simple Test:

<?php

class A {
   public function __construct() {}
}

class B {

    private $a;

    public function __construct(A $a) {
        $this->a = $a;
    }
}

// lets test
$reflection = new ReflectionClass('B');
$constructor = $reflection->getConstructor();
$parameter = $constructor->getParameters();

if(!is_a($parameter[0]->getClass(), 'ReflectionClass'))
    throw new Exception('ReflectionParameter::getClass did not return ReflectionClass');
?>

This code runs fine with native PHP 5.3. With Quercus the Exception is thrown, because getClass() returns null.

Notes
(0006386)
nam   
01-11-14 22:49   
php/525b

This was already fixed (I believe in 4.0.38).