#128 Parse in template class (phplib 7.4 pre2)

current_CVS
closed-accepted
Template (13)
5
2004-04-21
2003-08-05
Jordi
No

I think the "parse" function in template class is wrong.
The function returns the variable $str, but it should
return the variable $this->get_var($target). I found this
problem when I have pass to the function a array
variable and the function have returned me the parsing
of the last element, and not the append of the all
elements of the array.

Suggested modification:
on the last line of the parse function, replace:
return $str;

with
return $this->get_var($target);

Discussion

  • Nobody/Anonymous

    Logged In: NO

    The problem is carried through if you use pparse(). If you ahve $unknowns
    set to "remove", forget to fill in one of the placeholders then call pparse(),
    the content outputted to the browser still has the forgotten placeholder in
    plain sight.

     
  • Richard Archer

    Richard Archer - 2004-04-21
    • milestone: --> current_CVS
    • assigned_to: nobody --> richardarcher
    • status: open --> closed-accepted
     
  • Richard Archer

    Richard Archer - 2004-04-21

    Logged In: YES
    user_id=279311

    Thank you!

     

Log in to post a comment.