Kunena / Kunena-Forum

Kunena Forum - Forum / Bulletin Board / Discussions component for Joomla - This is the 6.x/5.x main development branch. Please do not open issues regarding earlier versions of Kunena
https://www.kunena.org
GNU General Public License v3.0
1.75k stars 812 forks source link

Maybe one double quote too much? #9691

Closed Gindi50 closed 4 months ago

Gindi50 commented 4 months ago

Describe the bug In the file /libraries/kunena/src/Factory/KunenaFactory.php there is possibly one double quote too much in row 269? $contents = str_replace('QQ', '"\""', $contents);

This may be related to /libraries/vendor/joomla/languages/src/Parser/IniParser.php in rows 57-68 // Check for any incorrect uses of QQ. if (strpos($line, 'QQ') !== false) { $errors[] = 'The deprecated constant _QQ_ is in use on line ' . $realNumber;

            continue;
        }

        // Check for odd number of double quotes.
        if (substr_count($line, '"') % 2 != 0) {
            $errors[] = 'There are an odd number of quotes on line ' . $realNumber;

            continue;

To Reproduce Steps to reproduce the behavior:

  1. Go to '/libraries/kunena/src/Factory/KunenaFactory.php...'
  2. Click on '....'
  3. Scroll down to 'Line 269....'
  4. See error in $contents = str_replace('QQ', '"\""', $contents);

Expected behavior A clear and concise description of what you expected to happen.

Actual result A clear and concise description of what you see. Like an error message.

Screenshots If applicable, add screenshots to help explain your problem.

System information (please complete the following information)

Joomla version: 5.1.1 Kunena version: 6.3.1 Php version: 8.3.7 Database version: 10.6.15-MariaDB

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

Gindi50 commented 4 months ago

The backslash is not visible in this report

xillibit commented 4 months ago

This is not an issue the backslash is here to be have the quotes

Gindi50 commented 4 months ago

What about the three quotes, is that ok or is one quote too much? I only wrote the backslash because it is not displayed here in the text between the quotes.