I've come across something a little odd. When I assign an array in pnuser.php (or another PHP file), I can work with that array as expected within my template. However, if I assign the return value of a module function, for instance, to a variable within a template and that return value happens to be an array, nothing works.
For instance, if I were to do this inside a template that we'll call myshorts.htm...
Code
<!--[pnmodapifunc modname="mymodule" type="user"
func="eatmyshorts" assign="myshorts"]-->
func="eatmyshorts" assign="myshorts"]-->
...where the returned value is an array, the result is (apparently) different than if I were to call that same function within pnuser.php and assign it to the template prior to fetching like so...
Code
$pnRender =& new pnRender('mymodule');
$myshorts = pnModAPIFunc('mymodule', 'user', 'eatmyshorts');
$pnRender->assign('myshorts', $myshorts);
$pnRender->fetch('eatmyshorts.htm');
$myshorts = pnModAPIFunc('mymodule', 'user', 'eatmyshorts');
$pnRender->assign('myshorts', $myshorts);
$pnRender->fetch('eatmyshorts.htm');
The following would work fine under the second scenario, but fail under the first:
Code
Flavor: <!--[$myshorts.flavor]--><br />
Texture: <!--[$myshorts.texture]--><br />
Bouquet: <!--[$myshorts.bouquet]-->
Texture: <!--[$myshorts.texture]--><br />
Bouquet: <!--[$myshorts.bouquet]-->
The same holds true for more complex operations with associative arrays.
Has anyone else experienced this? If so, do you know what causes it?
