Answers.Body: <p>Just a quick update on status - the Smarty2 to Smarty3 transition is still optional although at some point, once people are not hitting issues, it will be required. So if you are hitting issues then you should report them in gitlab and if you don't have time to dig into it then just switch back in the interim. We have not yet determined which release will hard-switch to Smarty3 but the absolute earliest that would be is 5.73</p>
  <p>We have also been testing Smarty4 and from CiviCRM  5.71 Smarty 2,3 and 4 will all work. Smarty 4 seems to solve a few things and the only additional challenges from it appear to be some notices if php functions that are not registered are used.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-06-18T09:02:14.800Z
Answers.Text: Confirming I had the same problem, removed the smarty3 function from `civicrm.settings.php` (to revert back to smarty2) and that fixed this issue for me.
Answers.UserDisplayName: Hugh
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-02-09T10:16:42.157Z
Answers.LastActivityDate: 2024-02-09T10:53:11.043Z
Answers.LastEditDate: 2024-02-09T10:53:11.043Z
Answers.UserDisplayName: eileen
Body: <p>After upgrading CiviCRM to 5.69.2 (along with several extensions), I'm occasionally getting the following error:</p>
  <blockquote>
  <p>Fatal error: Type of SmartyCompilerException::$line must be int (as in class Exception) in /home//www/www/wp-content/plugins/civicrm/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smartycompilerexception.php on line 8</p>
  </blockquote>
  <p>Looks like a bug in the PHP code.</p>
  <p>Anybody else see this? Any ideas?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-01-21T03:16:24.983Z
Comments.Text: This sounds familiar. Might be an incompatibility with php 8.2?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-01-22T18:31:14.137Z
Comments.Text: Maybe. I know a little PHP and the line in question reads:
  
      "class SmartyCompilerException extends SmartyException"
  
  which looks harmless and does not involve $line, but it is the first executable line in the file. I don't know anything about Smarty, but it doesn't appear to be an extension.
Comments.UserDisplayName: bobl
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-01-22T19:12:50.040Z
Comments.Text: If you look at the [definition of Exception](https://www.php.net/manual/en/class.exception.php), $line should be declared as int (or simply not redeclared). I don't know which version of php tightened things by adding the "int" or turning it from a warning into error. In general smarty3 integration with civi is still experimental. Consider turning it off in civicrm.settings.php if it's giving problems. My guess is there is some smarty2 code that is not valid in smarty3. I saw the error once when it had to do with use of the `{php}` tag.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-02-02T09:56:17.720Z
Comments.Text: Same problem here. Setting up Smarty3 cause "Add new contact" page breaks.
Comments.UserDisplayName: Pál Rudan
Tags: <php><smarty><issues>
Title: fatal error in "Smarty" after 5.69.2 upgrade
ThreadText: # fatal error in "Smarty" after 5.69.2 upgrade
  
  (Asked by: username_0 on 2024-01-20)
  
  After upgrading CiviCRM to 5.69.2 (along with several extensions), I'm occasionally getting the following error:
  
  > Fatal error: Type of SmartyCompilerException::$line must be int (as in class Exception) in /home//www/www/wp-content/plugins/civicrm/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smartycompilerexception.php on line 8
  
  Looks like a bug in the PHP code.
  
  Anybody else see this? Any ideas?
  
  **Tags:** php, smarty, issues
  
  > **Comments:**
  > **username_1**: This sounds familiar. Might be an incompatibility with php 8.2?  
  > **username_0**: Maybe. I know a little PHP and the line in question reads:      "class SmartyCompilerException extends SmartyException"  which looks harmless and does not involve $line, but it is the first executable line in the file. I don't know anything about Smarty, but it doesn't appear to be an extension.  
  > **username_1**: If you look at the [definition of Exception](https://www.php.net/manual/en/class.exception.php), $line should be declared as int (or simply not redeclared). I don't know which version of php tightened things by adding the "int" or turning it from a warning into error. In general smarty3 integration with civi is still experimental. Consider turning it off in civicrm.settings.php if it's giving problems. My guess is there is some smarty2 code that is not valid in smarty3. I saw the error once when it had to do with use of the `{php}` tag.  
  > **username_2**: Same problem here. Setting up Smarty3 cause "Add new contact" page breaks.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2024-02-09. Score: 1
  
  Just a quick update on status - the Smarty2 to Smarty3 transition is still optional although at some point, once people are not hitting issues, it will be required. So if you are hitting issues then you should report them in gitlab and if you don't have time to dig into it then just switch back in the interim. We have not yet determined which release will hard-switch to Smarty3 but the absolute earliest that would be is 5.73
  
  We have also been testing Smarty4 and from CiviCRM 5.71 Smarty 2,3 and 4 will all work. Smarty 4 seems to solve a few things and the only additional challenges from it appear to be some notices if php functions that are not registered are used.
  
  > **Comments:**
  > **username_4**: Confirming I had the same problem, removed the smarty3 function from `civicrm.settings.php` (to revert back to smarty2) and that fixed this issue for me.  
  
  ---
  
  