Ticket #5396 (new defect)

Opened 2 months ago

include/database/PearDatabase.php limitQuery Bug

Reported by: tapin13 Assigned to: developer
Priority: major Milestone: 5.1.0
Component: vtigercrm Version: 5.0.4
Keywords: tags, utf8 Cc:

Description

include/database/PearDatabase.php function limitQuery()

There is no function to check UTF8. This function using for example in Tags, so, it tar not in english, there is error back from function. To repair it, you need to add standart elements to function.

function limitQuery($sql,$start,$count, $dieOnError=false, $msg=)

{

global $log, $default_charset;

//$this->println("ADODB limitQuery sql=".$sql." st=".$start." co=".$count); $log->debug(' limitQuery sql = '.$sql .' st = '.$start .' co = '.$count); $this->checkConnection();

if(strtoupper($default_charset) == 'UTF-8')

$this->database->Execute("SET NAMES utf8");

$result =& $this->database->SelectLimit?($sql,$count,$start);