Answers.Body: <p>You must be on a very old version of civi since DB/common.php is now included in vendor not packages since about 2 years ago. Very old versions aren't going to support php 8. I suggest upgrading civi.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-06-29T17:29:52.900Z
Answers.Text: I do updates regularly. It is currently 5.50.1. version installed. The solution to the problem is not the outdated version you mentioned.
Answers.UserDisplayName: Fatih ATEŞ
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-06-29T17:36:15.163Z
Answers.Text: That file shouldn't exist in packages though. I see it's joomla - when you upgraded did you completely delete the existing civicrm folder or just extract the new files over the existing files? You need to completely remove the existing civicrm folder first, otherwise old files don't get deleted.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-06-29T22:34:45.650Z
Answers.Text: Hello @demerit. I installed CRM about 9 years ago and until now I have installed all the updates via Joomla Admin Panel - Plugins - Manage - Install section, via direct download link via URL in "Install from Link" tab. I did not perform any file deletion from FTP. I thought this action would harm the system. Can you let me know which one to delete?
Answers.UserDisplayName: Fatih ATEŞ
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-06-29T04:41:01.493Z
Answers.LastActivityDate: 2022-06-29T04:41:01.493Z
Answers.UserDisplayName: Demerit
Body: <p>I want to switch to 8.0 as PHP 7.4 is now giving warnings. But, I am getting the error '<code>com_civicrm/civicrm/packages/DB/common.php on line 265</code>' when implementing PHP 8.0.</p>
  <p>Code written in the relevant line:</p>
  <pre><code>    function quoteString($string)
  {
      $string = $this-&gt;quoteSmart($string);
      if ($string{0} == &quot;'&quot;) {
          return substr($string, 1, -1);
      }
      return $string;
  }
  </code></pre>
  <p>When I add /** to the beginning of the line, the system boots because it does not read the command. But I don't know if this will cause any problems.</p>
  <p>Another PHP error I get after the system boots up is '<code>media/civicrm/templates_c/tr_TR/%%EA/EAA/EAA96A89%%joomla.tpl.php on line 56</code>'</p>
  <p>The command on the line:</p>
  <pre><code>&lt;?php if ($this-&gt;_tpl_vars['localTasks']): ?&gt;
  </code></pre>
  <p>I request your support to solve both errors.</p>
  
Tags: <joomla><civicrm-home><php8>
Title: I am getting the error '/packages/DB/common.php on line 265' when implementing PHP 8.0
ThreadText: # I am getting the error '/packages/DB/common.php on line 265' when implementing PHP 8.0
  
  (Asked by: username_0 on 2022-06-29)
  
  I want to switch to 8.0 as PHP 7.4 is now giving warnings. But, I am getting the error '`com_civicrm/civicrm/packages/DB/common.php on line 265`' when implementing PHP 8.0.
  
  Code written in the relevant line:
  
  ```
      function quoteString($string)
  {
      $string = $this->quoteSmart($string);
      if ($string{0} == "'") {
          return substr($string, 1, -1);
      }
      return $string;
  }
  
  ```
  
  When I add /\*\* to the beginning of the line, the system boots because it does not read the command. But I don't know if this will cause any problems.
  
  Another PHP error I get after the system boots up is '`media/civicrm/templates_c/tr_TR/%%EA/EAA/EAA96A89%%joomla.tpl.php on line 56`'
  
  The command on the line:
  
  ```
  <?php if ($this->_tpl_vars['localTasks']): ?>
  
  ```
  
  I request your support to solve both errors.
  
  **Tags:** joomla, civicrm-home, php8
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-06-29. Score: 1 | Accepted answer
  
  You must be on a very old version of civi since DB/common.php is now included in vendor not packages since about 2 years ago. Very old versions aren't going to support php 8. I suggest upgrading civi.
  
  > **Comments:**
  > **username_0**: I do updates regularly. It is currently 5.50.1. version installed. The solution to the problem is not the outdated version you mentioned.  
  > **username_1**: That file shouldn't exist in packages though. I see it's joomla - when you upgraded did you completely delete the existing civicrm folder or just extract the new files over the existing files? You need to completely remove the existing civicrm folder first, otherwise old files don't get deleted.  
  > **username_0**: Hello @username_1. I installed CRM about 9 years ago and until now I have installed all the updates via Joomla Admin Panel - Plugins - Manage - Install section, via direct download link via URL in "Install from Link" tab. I did not perform any file deletion from FTP. I thought this action would harm the system. Can you let me know which one to delete?  
  
  ---
  
  