logo       

Re: [PHP-DEV] Changes between 5.1.1 & 5.1.2-dev breaks PHP - Smarty plugin: msg#00009

Subject: Re: [PHP-DEV] Changes between 5.1.1 & 5.1.2-dev breaks PHP - Smarty plugin
Please report this to smarty-dev@xxxxxxxxxxxxx

On 16.12.2005 20:12, Holografix wrote:
Hello
This works fine with 5.1.1

PHP

include '/wwwroot/lib/smarty/Smarty.class.php';

$tpl = new Smarty;
$tpl->plugins_dir = array('/wwwroot/lib/smarty/plugins', '/wwwroot/home/testes/plugins');
$tpl->force_compile = true;

$link = mysql_connect('localhost', 'xxxxx', 'yyyyy');
mysql_select_db('dbteste');

$res = mysql_query('SELECT * FROM Photos ORDER BY PhotoID');
while ($row = mysql_fetch_assoc($res)) {
   $rows[] = $row;
}

$tpl->assign("images", $rows);
$tpl->display("table2.tpl");

Template
<html>
<body>
<h1>Test</h1>
{table_foreach from=$images item=image cols=4 rows=4}
<img src="{$image.Photo}" />
{/table_foreach}
</body>
</html>

The plugin is table_foreach, a bit long to copy & paste here
http://smarty.incutio.com/?page=table_foreach

Something change between 5.1.1 release and today 5.1.2-dev snapshot.

I am getting this errors in my php error log file

[16-Dec-2005 17:05:32] PHP Strict Standards: Only variables should be passed by reference in C:\wwwroot\lib\smarty\Smarty_Compiler.class.php on line 729 [16-Dec-2005 17:05:32] PHP Strict Standards: Only variables should be passed by reference in C:\wwwroot\home\tests\templates_c\%%72^721^721E602F%%table2.tpl.php on line 8 [16-Dec-2005 17:05:32] PHP Strict Standards: Only variables should be passed by reference in C:\wwwroot\home\tests\templates_c\%%72^721^721E602F%%table2.tpl.php on line 11

LINE 729 - Smarty_Compiler.class.php
$arg_list = $this->_compile_arg_list('block', $tag_command, $attrs, $_cache_attrs='');

LINE 8 - %%72^721^721E602F%%table2.tpl.php
<?php $this->_tag_stack[] = array('table_foreach', array('from' => $this->_tpl_vars['images'],'item' => 'image','cols' => 4,'rows' => 4)); smarty_block_table_foreach($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat=true);while ($_block_repeat) { ob_start(); ?>

LINE 11 - %%72^721^721E602F%%table2.tpl.php
<?php $_block_content = ob_get_contents(); ob_end_clean(); echo smarty_block_table_foreach($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat=false); } array_pop($this->_tag_stack); ?>

Best regards



--
Wbr, Antony Dovgal

--
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe