PHP Parse error: syntax error, unexpected token "class" in /usr/share/php/smarty3/sysplugins/smarty_internal_templateparser.php on line 24
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
fusiondirectory (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
smarty3 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
smarty 3.1.39-2ubuntu1 template parsing code is broken :
dpkg -l | grep smarty
ii smarty3 3.1.39-2ubuntu1 all Smarty - the compiling PHP template engine
Given this test.php file :
<?php
require(
$smarty = new Smarty();
$smarty-
$smarty-
$smarty-
?>
and those directories :
ls
cache configs templates templates_c test.php test.php~
find
.
./templates
./templates/
./cache
./templates_c
./configs
./test.php~
./test.php
php test.php
<PRE>
Smarty Installation test...
Testing template directory...
/test/templates is OK.
Testing compile directory...
/test/templates_c is OK.
Testing plugins directory...
/usr/share/
Testing cache directory...
/test/cache is OK.
Testing configs directory...
/test/configs/ is OK.
Testing sysplugin files...
... OK
Testing plugin files...
... OK
Tests complete.
</PRE>
PHP Parse error: syntax error, unexpected token "class" in /usr/share/
problem is from a line containing 0 :
(...)
// line "./lexer/
0
// line 11 "./lexer/
/**
* Smarty Template Parser Class
*
* This is the template parser.
* It is generated from the smarty_
*
* @author Uwe Tews <email address hidden>
*/
class Smarty_
cat /etc/lsb-release RELEASE= 22.04 CODENAME= jammy DESCRIPTION= "Ubuntu 22.04.1 LTS"
DISTRIB_ID=Ubuntu
DISTRIB_
DISTRIB_
DISTRIB_