From:             locutus dot unimatrix01 at gmail dot com
Operating system: ubuntu 7.10
PHP version:      5.2CVS-2008-02-02 (snap)
PHP Bug Type:     XSLT related
Bug description:  Can't call instanciated objects methods from stylesheets

Description:
------------
$ php -v
PHP 5.2.3-1ubuntu6.3 (cli) (built: Jan 10 2008 09:38:41) 
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

Using XSLTProcessor::registerPHPFunctions(), i can call static methods,
but not normal ones.

In the source linked with my bug report i made two version of the call to
the normal method, one with '>' and one with '>', that's because i'm not
really sure how xslt handle special chars in attributes.

You may need to know that this code is actually executed in a php script
i'm writing as an apache handler for an xml document i use as a website
template, here is the relevant part of my virtual host:

Alias /uis /usr/share/uis/
Action uis-processor /uis/uis.php
AddHandler uis-processor .uis
DirectoryIndex index.uis

Reproduce code:
---------------
You can get the code at this url:
http://daffy.vuegate.net/php/register_php_functions.phps

Expected result:
----------------
This is the static method.
This is the normal method.
This is the normal method.

Actual result:
--------------
Warning: XSLTProcessor::transformToXml()
[function.XSLTProcessor-transformToXml]: Unable to call handler
$test_instance->normal_method() in /usr/share/uis/uis.php on line 56

Warning: XSLTProcessor::transformToXml()
[function.XSLTProcessor-transformToXml]: xmlXPathCompiledEval: evaluation
failed in /usr/share/uis/uis.php on line 56

Warning: XSLTProcessor::transformToXml()
[function.XSLTProcessor-transformToXml]: runtime error: file
/usr/share/uis/ line 21 element value-of in /usr/share/uis/uis.php on line
56

Warning: XSLTProcessor::transformToXml()
[function.XSLTProcessor-transformToXml]: XPath evaluation returned no
result. in /usr/share/uis/uis.php on line 56

This is the static method.

-- 
Edit bug report at http://bugs.php.net/?id=44024&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=44024&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44024&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44024&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44024&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=44024&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=44024&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=44024&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=44024&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=44024&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=44024&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=44024&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=44024&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=44024&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=44024&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=44024&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=44024&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=44024&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=44024&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44024&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=44024&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=44024&r=mysqlcfg

Reply via email to