[fixed]Sec. error: Call to dynamic object member not allowed

Post Reply
leolivier

[fixed]Sec. error: Call to dynamic object member not allowed

Post by leolivier »

When loading the admin page of my module (HostedVideoAlbums) which works perfectly (I hope so :)) in 1.10.3, I get the following error:

Code: Select all

Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "module_file_tpl:HostedVideoAlbums;adminpanel.tpl" on line 20 "{$oneitem->$oneval}</td>" Security error: Call to dynamic object member not allowed' in D:\wamp\www\cmsms1.11b4\lib\smarty\sysplugins\smarty_internal_templatecompilerbase.php on line 656
The smarty code is:

Code: Select all

{foreach from=$itemlist item=oneitem}
{cycle values="row2,row1" assign=rowclass}
<tr class="{$rowclass}" onmouseover="this.className='{$rowclass}hover';" onmouseout="this.className='{$rowclass}';">
	{foreach from=$adminshow item=column}
		{assign var=oneval value=$column[1]}
		<td{if $column[2]} class="ctlmm_nosearch"{/if}>
		     {$oneitem->$oneval}</td>
	{/foreach}
</tr>
{/foreach}
FYI, this piece of code has been generated as-is by CTLMM (Catalog Module Maker)

All this worked perfectly in previous versions of smarty and I can't understand why it should break in new versions...
Most of my (many and sometimes big) templates use php objects in smarty so I don't want them to be broken!

Any help appreciated
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Security error: Call to dynamic object member not allowe

Post by calguy1000 »

Fixed in svn... I think this is another smarty bug.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Jean le Chauve

Re: Security error: Call to dynamic object member not allowe

Post by Jean le Chauve »

Great, the module work with svn 8192 :)
Thank You Calguy
Post Reply

Return to “Closed Issues”