Re: zend_call_method
| From: | Johannes Schlüter | Date: | Tue, 07 Sep 2010 10:54:05 +0000 |
| Subject: | Re: zend_call_method | ||
| References: | 1 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-7609@lists.php.net to get a copy of this message | ||
On Tue, 2010-09-07 at 03:40 -0700, Nicolas Brousse wrote:
> Fatal error: Class entry requested for an object without PHP class in
> Unknown on line 0
>
> I'm not sure to understand what does it mean. Any clue ?
>
> + zval *rv;
> + zend_function *free;
> + zend_hash_find(&intern->std.ce->function_table, "free",
> sizeof("free"),(void **) &free);
> + zend_call_method_with_0_params((zval **) object, intern->std.ce, &free ,
> "free", &rv);
So where does "object" come from, where is it set? :-)
In a related note: Don't do the lookup yourself but either pass NULL as
fn_proxy or pass an pointer which will be filled by the engine after
_the engine_ did the lookup in order to speedup subsequent calls.
Probably you also can use NULL as class entry, unless you need the scope
function to access a private or inherited method.
johannes