Re: Fwd: [PHP-DEV] RC1

From: Date: Sat, 28 Feb 2004 16:04:44 +0000
Subject: Re: Fwd: [PHP-DEV] RC1
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-8250@lists.php.net to get a copy of this message
On Thu, 2004-02-26 at 08:57, Marcus Boerger wrote: > Hello Timm, > > i think this is not completley correct. When reflection is used from a > static member of the class itself it should still work. Correct: class Foo { protected function __construct() { } public static function create() { $r= new Reflection_Class('Foo'); return $r->newInstance(); } } should work as newInstance() is called within the context "Foo". > We have functions which enable such checks. I've tried to find out which context I am in. Alas, EG(scope)->name contains "reflection_class" at the moment I'm trying to check it. Something like EG(prev_execute_data) might help, but I'm not sure I should be using it:) > Could you have a try with those? Also i have > already incorporated the other patch so you need to update the engine > sources. I saw that, but you missed this one (fixes the following segfault: $ cat reflection_segfault.php <?php $r= new Reflection_Class(NULL); ?> $ php-dev reflection_segfault.php Segmentation fault (core dumped) Attached is a one-line patch that fixes it. - Timm

Attachment: [text/x-patch] zend_reflection_api.diff
« previous php.internals (#8250) next »