[PHPTAL] not set variable causes errors

Christoph Frick frick at sc-networks.com
Thu Jun 14 14:48:42 CEST 2007


On Thu, Jun 14, 2007 at 02:39:25PM +0200, Mynthon wrote:

> if i use variable that is not set phptal shows error. I think that not
> set variable should be treated as empty string. Or maybe there is an
> option i missed?

why is that? unknown vars are a key error also in ZPT.

> and what about direct access to superglobal variables?
> ${superglobal/GET/value} or smth like that?

as i use a request class, that handles stuff like the one in zope i have
this managed in another way but similar to what you want. just add a
dict named superglobal to the page and store what ever you want in it
(e.g. _GET, _POST, _REQUEST, ...) with names you like.

-- 
cu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 163 bytes
Desc: not available
Url : http://lists.motion-twin.com/pipermail/phptal/attachments/20070614/f84f49b1/attachment.pgp


More information about the PHPTAL mailing list