ID:               24286
 Comment by:       bloso at mailbr dot com dot br
 Reported By:      terjeto at stud dot ntnu dot no
 Status:           Verified
 Bug Type:         Zend Engine 2 problem
 Operating System: RedHat 9.0
 PHP Version:      5CVS-2003-06-22 (dev)
 New Comment:

I've got the same error message:

Fatal error: Method name must be a string in
/var/www/htdocs/scorphus/phplab/countracker/tpl/templates_c/%%200/%%2001463753/index.html.php
on line 28

index.html.php line 28:
<br><?php echo $this->_plugins['function']['eval'][0](array('var' =>
$this->_config[0]['vars']['credits']), $this) ; ?>

PHP Version: 5.0.0b2-dev (php5-200307071930.tar.gz)
Configure Command: './configure' '--with-mysql' '--with-apxs'
System: Slackware 9 (2.4.20) and Debian 3.0 r1 (2.4.20)
Also unsing: Smarty 2.4.2

Hope it helps,
Pablo.


Previous Comments:
------------------------------------------------------------------------

[2003-06-29 10:55:12] [EMAIL PROTECTED]

Works fine in php 4.3.3, so this appears to be a BC issue.

------------------------------------------------------------------------

[2003-06-22 10:54:07] terjeto at stud dot ntnu dot no

Description:
------------
When using a string from an array inside an class for 
calling a function it results in a fatal error.

Reproduce code:
---------------
<?php

class Foo {
        var $_array = array( 'function' => array ( 'spacer' => array( 0 =>
'_funk' ) ) );
}

function _funk( $arg ) {
        print( $arg );
}

$_out = array( 'function' => array ( 'spacer' => array( 0 => '_funk' )
) );

_funk( "Test string 1<br>" );

$foo = new Foo();

$foofunk = $foo->_array['function']['spacer'][0];

$foofunk( "Test string 2<br>" );

$_out['function']['spacer'][0]( "Test string 3<br>" );
$foo->_array['function']['spacer'][0]( "Test string 4<br>" );
?>

Expected result:
----------------
Test string 1
Test string 2
Test string 3
Test string 4

Actual result:
--------------
Test string 1
Test string 2
Test string 3

 Fatal error:  Method name must be a string in /var/
www/html/test.php on line 22


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=24286&edit=1

Reply via email to