From: bryan at phpandmore dot com Operating system: Red Hat PHP version: 5.1.1 PHP Bug Type: Scripting Engine problem Bug description: Error while using a defined constant in a concat string
Description: ------------ I am defining a constant named SITE_ROOT, and it contains the value "/homepages/29/d113403321/htdocs". When I try to use it in Smarty.class.php, on line 75 or the latest stable version 2.6.11, and I get this parse error. I changed the coding for the class variables so that they would not issue a notice b/c of using var rather than public: Parse error: parse error, unexpected '.', expecting ',' or ';' in /homepages/29/d113403321/htdocs/dev/smarty/Smarty.class.php on line 75 Reproduce code: --------------- define("SITE_ROOT", '/homepages/29/d113403321/htdocs'); public $template_dir = SITE_ROOT2 . '/dev/smarty/templates'; Expected result: ---------------- $template_dir having a value of /homepages/29/d113403321/htdocs/dev/smarty/templates Actual result: -------------- parse error -- Edit bug report at http://bugs.php.net/?id=35697&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35697&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35697&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35697&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35697&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35697&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35697&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35697&r=needscript Try newer version: http://bugs.php.net/fix.php?id=35697&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35697&r=support Expected behavior: http://bugs.php.net/fix.php?id=35697&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35697&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35697&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35697&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35697&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35697&r=dst IIS Stability: http://bugs.php.net/fix.php?id=35697&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35697&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35697&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35697&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35697&r=mysqlcfg