Below line
tal:attributes="action php:GLOBALS['paypal']['url']"
raises:
PHPTAL_VariableNotFoundException' with message 'Unable to find variable 'GLOBALS' in current scope'
while
tal:attributes="action php:GLOBALS['paypal']['url']"
works
Below line
tal:attributes="action php:GLOBALS['paypal']['url']"
raises:
PHPTAL_VariableNotFoundException' with message 'Unable to find variable 'GLOBALS' in current scope'
while
tal:attributes="action php:GLOBALS['paypal']['url']"
works
It's not a good practice to rely on globals at all. You should be passing variables to PHPTAL explicitly:
$phptal->set('paypal', $GLOBALS['paypal']);
and then use action="${paypal/url}"
or if you really must:
$phptal->set('GLOBALS', $GLOBALS);