2

While configuring custom fields in mantis i got this error message , any idea

Parse error: syntax error, unexpected T_STRING in C:\wamp\www\MyProj\custom_strings_inc.php on line 3

The code is

<?php
if( lang_get_current() == 'german' ) {
    $defect_impact = 'Defect Impact'; #// German translation of Defect Impact
    $defect_type =  'Defect Type'; #// German translation of Defect Type
    $phase_of_origin =  ’Phase Of Origin’; #// German translation of Phase Of Origin
}else{
# Default (use your preferred language as the default)
    $defect_impact = 'Defect Impact'; // German translation of Defect Impact
    $defect_type =  'Defect Type'; // German translation of Defect Type
    $phase_of_origin =  'Phase Of Origin'; // German translation of Phase Of Origin
}
?>
2
  • 2
    Any reason why you use both way to one-line comment ( # and // )?
    – Nettogrof
    Commented Oct 14, 2011 at 2:57
  • 1
    thank u nettogrof , now using // only
    – moshe
    Commented Oct 14, 2011 at 3:19

1 Answer 1

9

Wrong quotes on this line:

$phase_of_origin =  ’Phase Of Origin’;

Should be:

$phase_of_origin =  'Phase Of Origin';
2
  • Still i am unable to correct it eventhough teh error line changed now the error msg is "Parse error: syntax error, unexpected T_STRING in C:\wamp\www\XRINFX\custom_strings_inc.php on line 8" the 6,7,8th lines are 6 => }else{ 7=>$defect_impact = 'Defect Impact'; // English translation of Defect Impact 8=>$defect_type = 'Defect Type'; // English translation of Defect Type
    – moshe
    Commented Oct 14, 2011 at 4:06
  • Thank you guys , problem solved and you are right...i renamed the project folder (inside www) now it is up and running , only issus is if i use the original name for the folder , error is displayed again , thanks again .
    – moshe
    Commented Oct 14, 2011 at 6:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.