User tests: Successful: Unsuccessful:
Pull Request for Issue #13507 .
SQL Server database always escape backslash in result.
This PR stripslashes for each column from result query.
Before patch
Warning: Invalid argument supplied for foreach() in .../administrator/components/com_contenthistory/helpers/contenthistory.php on line 32
Warning: Invalid argument supplied for foreach() in .../administrator/components/com_contenthistory/helpers/contenthistory.php on line 295
After patch the warning does not appears and you see some information.
Before patch
\"\\", next \\\\", etc.After patch the number of backslashes are not increased on each save.
Before patch:
Link A Text (Images and Links Tab): A""B.Error decoding JSON data: Syntax error.After patch
N/A
| Status | New | ⇒ | Pending |
| Category | ⇒ | MS SQL Libraries |
| Labels |
Added:
?
|
||
Test instruction added.
There is a lots of problems with mssql. This PR only fix a few of them.
There is a lots of places where something does not work this not means this PR is buggy.
"This PR fix only SELECT queries".
I have tested this item
Thanks!
I have tested this item
| Status | Pending | ⇒ | Ready to Commit |
RTC
Just one question, you removed loadResult from the class because the JDatabaseDriver class does the job ok?
yes
| Status | Ready to Commit | ⇒ | Fixed in Code Base |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-01-11 19:44:54 |
| Closed_By | ⇒ | rdeutz | |
| Labels |
Added:
?
|
||
It is not removed because it is inherited from JDatabaseDriver
After more deep searching I found this PR fixed errors but does not do it in the right way.
It was weird to me that I have to use stripslashes() but it worked.
At the end I have found that $db->quote() does not work correctly and generate additional backslashes that are saved to database (specially to columns with encoded json). After that stripslashes() is needed.
After I changed $db->quote() code then stripslashes() is not needed.
Take a look at PR #13585
Missing testing instruction.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13534.