Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
pnVarCleanFromInput doesn't preserve empty variables
  • Posted: 24.12.2002, 19:21
     
    Rundum
    rank:
    Freshman Freshman
    registered:
     November 2002
    Status:
    offline
    last visit:
    06.12.07
    Posts:
    37
    Yes I know, bug reports should be entered directly into phpBugTracker, but unfortunately phpBugTracker has a bug itself and gives back 'DB Error: syntax error', so I will report my bug here (hey, nobody will expect me to retype everything again, isn't it ;) )

    Problem: Sometimes there are arguments that are empty, eg forms with several buttons submit the information on which button has been pressed by providing the empty variable with the button's name. By using pnVarCleanFromInput(), this information gets lost because it doesn't distinguish between empty and NULL.
    Solution: In function pnVarCleanFromInput(), file pnAPI.php, the line saying array_push($resarray, NULL) has to be replaced with array_push($resarray, ''). After this correction, everything works for me.
    Caution: Maybe also pnVarPrepFor* have to be checked for this bug!
  • Posted: 28.12.2002, 14:56
     
    Rundum
    rank:
    Freshman Freshman
    registered:
     November 2002
    Status:
    offline
    last visit:
    06.12.07
    Posts:
    37
    The above bug is no bug, and it does not solve the problem yet.
    The real problem is in pnHTML.php, the way it outputs submit buttons. The access code is printed as "accesscode=", which is not HTML. HTML would be "name=". And with this correction, now it really works ;)

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula