0

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.

1 Answer 1

1

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.

3
  • I do updates regularly. It is currently 5.50.1. version installed. The solution to the problem is not the outdated version you mentioned. Jun 29, 2022 at 17:29
  • 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.
    – Demerit
    Jun 29, 2022 at 17:36
  • 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? Jun 29, 2022 at 22:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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