#29268 [Opn->Csd]: __autoload() not called with reflectionProperty->getClass()

From: Date: Fri, 21 Oct 2005 08:04:14 +0000
Subject: #29268 [Opn->Csd]: __autoload() not called with reflectionProperty->getClass()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-86845@lists.php.net to get a copy of this message
ID: 29268 Updated by: dmitry@php.net Reported By: david at jool dot nl -Status: Open +Status: Closed Bug Type: Scripting Engine problem Operating System: winXP PHP Version: 5.0.0 -Assigned To: +Assigned To: dmitry New Comment: Fixed in CVS HEAD and PHP_5_1. Previous Comments: ------------------------------------------------------------------------ [2005-10-21 01:26:44] david at jool dot nl Still not fixed. tested with latest CVS ------------------------------------------------------------------------ [2005-10-12 05:33:52] php at mfn dot de I still encounter this bug in PHP 5.1.0RC1 on Win2k, also in snapshot from Oct 12, 2005 02:30 GMT. Here's a shorter reproduce code: function foo(Bar $bar) {} function __autoload($c) { class bar {} } $RF = new ReflectionFunction('foo'); foreach($RF->getParameters() as $param) { var_dump($param->getClass()); } ------------------------------------------------------------------------ [2005-03-14 01:00:17] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2005-03-06 20:51:28] sniper@php.net Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip ------------------------------------------------------------------------ [2005-01-15 17:59:58] david at jool dot nl A possible solution might be to also check if zend_fetch_class() also returns null, next to zend_hash_find(). I'm not able to compile it myself, but the fix might be to change line 1703 in zend_reflection_api.c from if (zend_hash_find(EG(class_table), lcname, param->arg_info->class_name_len + 1, (void **) &pce) == FAILURE) { to if (zend_hash_find(EG(class_table), lcname, param->arg_info->class_name_len + 1, (void **) &pce) == FAILURE && zend_fetch_class(lcname, (param->arg_info->class_name_len + 1), ZEND_FETCH_CLASS_AUTO TSRMLS_CC) == NULL) { ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/29268 -- Edit this bug report at http://bugs.php.net/?id=29268&edit=1

« previous php.bugs (#86845) next »