Skip to content

Commit

Permalink
Workaround: Joomla Fix Database insertion
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Uhl committed Aug 9, 2016
1 parent e45160c commit d3c9687
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libraries/cms/schema/changeitem/mysql.php
Expand Up @@ -60,10 +60,11 @@ protected function buildCheckQuery()
$command = strtoupper($wordArray[0] . ' ' . $wordArray[1]);

// Check for special update statement to reset utf8mb4 conversion status
if (($command == 'UPDATE `#__UTF8_CONVERSION`'
if ((($command == 'UPDATE `#__UTF8_CONVERSION`'
|| $command == 'UPDATE #__UTF8_CONVERSION')
&& strtoupper($wordArray[2]) == 'SET'
&& strtolower(substr(str_replace('`', '', $wordArray[3]), 0, 9)) == 'converted')
&& strtolower(substr(str_replace('`', '', $wordArray[3]), 0, 9)) == 'converted') ||
(($command == 'INSERT INTO `#__nullDate_conversion`') && strtolower(substr(str_replace('`', '', $wordArray[3]), 0, 9)) == 'converted'))
{
// Statement is special statement to reset conversion status
$this->queryType = 'UTF8CNV';
Expand Down

0 comments on commit d3c9687

Please sign in to comment.