Page 1 of 1

Swift : test OK but error as plug-in

Posted: Sun Nov 09, 2008 4:29 pm
by hdebfree
Hi,

I am using a remote server. I can call Swift 3.3.3-php5 from a program or from smokes test.

If I am checking Swift from a smokes test (runTestOfBasicSend.php), the result is green and the email is sent and received correctly.

But when I am calling Swift as a program plug-in, I get this error message :
Parse error: syntax error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in
/mnt/100/sdc/d/7/****/Swift.php on line 36
Line 36 is for class Swift : const VERSION = "3.3.2";

Code: Select all

 [size=85]class Swift
{
  /**
   * The version number.
   */
  const VERSION = "3.3.2";
  /**[/size] 
Nothing is missing or wrong around this line and Swift works fine when called by the test. It's the Php5 version. As the remote server is providing Php5 and Php4, I checked that I am running with Php5.

The original plug-in was Swift 3.2.6_4 and I replaced it by the 3.3.2. Perhaps an idea ?
Writing this I think I have to go back to the older version or to find the differences between the two swift.php ...