-
Notifications
You must be signed in to change notification settings - Fork 715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
constants not working v3.1.23 #28
Comments
no problem here |
The problem appears if the constant is not defined. index.php <?php
require __DIR__ . '/smarty-3.1.23/libs/Smarty.class.php';
// !!!
//define('TEST_CONST', false);
class Template extends Smarty
{
public function __construct()
{
parent::__construct();
$this->setTemplateDir(__DIR__ . '/templates/')
->setCompileDir(__DIR__ . '/templates_c/')
->setConfigDir(__DIR__ . '/configs/')
->setCacheDir(__DIR__ . '/cache/');
$this->compile_check = true;
//$this->default_modifiers = array('escape:"htmlall"');
}
}
$obj = new Template();
$obj->display('test.tpl'); templates/test.tpl {if $smarty.const.TEST_CONST === true}
success
{/if}
render ok |
ok now i can confirm that Parse error: syntax error, unexpected 'TEST_CONST' (T_STRING) in i think its better to check with defined() previously if the constant is exist |
Merged
uwetews
added a commit
that referenced
this issue
May 14, 2015
…ely with function name as tag name #28
uwetews
added a commit
that referenced
this issue
May 14, 2015
…ely with function name as tag name #28
think-mcunanan
pushed a commit
to think-mcunanan/smarty
that referenced
this issue
Mar 22, 2023
…ing-type-of-slide_reservation-from-int-to-bit(1) Redmine #5019 changing type of slide reservation from int to bit(1)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
compiled to
error: PHP Parse error: syntax error, unexpected 'SEA_IS_P_NAME' (T_STRING)
''
- is two single quotes.The text was updated successfully, but these errors were encountered: