ID:               24939
 Updated by:       [EMAIL PROTECTED]
 Reported By:      hans at velum dot net
-Status:           Open
+Status:           Feedback
 Bug Type:         Zend Engine 2 problem
 Operating System: Linux (Debian)
 PHP Version:      5.0.0b1 (beta1)
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.




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

[2003-08-04 13:41:56] hans at velum dot net

Description:
------------
Smarty uses a rather complex variable method name replacement system. 
In the "compiled" Smarty templates there is code like this:

  $this->_plugins['function']['assign'][0](/* params */)

Which works fine in PHP4, but PHP5 issues a fatal error:

  "Fatal error: Method name must be a string"

Is this a PHP5 bug or an abuse of PHP syntax (and therefore a Smarty
bug)?

Reproduce code:
---------------
A Smarty compiled template:

<?php $this->_load_plugins(array(
array('function', 'assign', 'sql/db-init/Control.tpl', 1, false),));
?><?php echo $this->_plugins['function']['assign'][0](array('var' =>
'fname','value' =>
"sql/db-init/".$this->_tpl_vars['targetDatabase']."/createdb.tpl"),
$this) ; ?>

<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include($this->_tpl_vars['fname'], array());
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
~

Expected result:
----------------
No error.

Actual result:
--------------
Fatal error: Method name must be a string in
templates_c/%%-16/%%-1662958972/Control.tpl.php


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


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

Reply via email to