This does appear to fix it.. (diff attached) - however I'm not sure if there are any knock on effects that this may cause?????

Regards
alan




[EMAIL PROTECTED] wrote:
This may be where the problem:

zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args);

Would this do the trick?

zend_get_parameters_array(ZEND_NUM_ARGS(), args);

On Wednesday, Oct 22, 2003, at 20:47 America/New_York, Alan Knowles wrote:

There is already a bug report on it, however It sounds like it's unlikely to be fixed in PHP4...

Regards
Alan

[EMAIL PROTECTED] wrote:

The methods of an object that has been passed to the overload() function lose their ability to have parameters passed by reference. For example:
class Foo
{
function hello(&$array)
{
$array[] = "hello";
}
}
$array = null;
$foo = & new foo();
$foo->hello($array);
print_r($array)
Output:
Array
(
[0] => hello
)
class Foo extends PEAR_Autoloader
{
function hello(&$array)
{
$array[] = "hello";
}
}
$array = null;
$foo = & new foo();
$foo->hello($array);
print_r($array)
Output:
Nothing!



-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php




--
Can you help out?
Need Consulting Services or Know of a Job?
http://www.akbkhome.com
? diff.txt
Index: overload.c
===================================================================
RCS file: /repository/php-src/ext/overload/Attic/overload.c,v
retrieving revision 1.20.2.3
diff -u -r1.20.2.3 overload.c
--- overload.c  15 Apr 2003 04:14:21 -0000      1.20.2.3
+++ overload.c  24 Oct 2003 07:50:15 -0000
@@ -526,7 +526,7 @@
 
        args = (zval ***)emalloc(ZEND_NUM_ARGS() * sizeof(zval **));
 
-       if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) {
+       if (zend_get_parameters_array(ht, ZEND_NUM_ARGS(), (zval **)args) == FAILURE) {
                efree(args);
                php_error(E_WARNING, "unable to obtain arguments");
                return;

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to