krlaboratories

fix bug MariaDB with unicode in J1.5

Oct 30th, 2021 (edited)
4,441
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. Fix MariaDB 10 unicode bug in Joomla 1.5+:
  2.  
  3. 1. open libraries/joomla/database/database/mysql.php
  4. or libraries/joomla/database/database/mysqli.php //depending on the data in the file configuration.php
  5.  
  6. 2. comment the line on stroke 186: return ($verParts[0] == 5 || ($verParts[0] == 4 && $verParts[1] == 1 && (int)$verParts[2] >= 2));
  7.  
  8. 3. below add
  9.  
  10. return (1);
  11.  
  12. All code:
  13.  
  14. function hasUTF()
  15. {
  16. $verParts = explode( '.', $this->getVersion() );
  17. // return ($verParts[0] == 5 || ($verParts[0] == 4 && $verParts[1] == 1 && (int)$verParts[2] >= 2));
  18. return (1);
  19. }
  20.  
  21. Save and enjoy!
Advertisement
Add Comment
Please, Sign In to add comment