MDL-52286 core: several fixes to ADOdb

This commit is contained in:
Marina Glancy 2015-12-14 11:01:53 +08:00
parent bca69f937c
commit cc3048eb41
5 changed files with 23 additions and 3 deletions

View file

@ -38,7 +38,7 @@ global $_COLONARR,$_COLONSZ;
$_COLONARR = array();
$_COLONSZ = sizeof($arr);
$sql2 = preg_replace("/(:[0-9]+)/e","_colontrack('\\1')",$sql);
$sql2 = preg_replace_callback('/(:[0-9]+)/', create_function('$m', 'return _colontrack($m[0]);'), $sql);
if (empty($_COLONARR)) return array($sql,$arr);

View file

@ -1050,7 +1050,7 @@ class ADORecordSet_mysqli extends ADORecordSet{
//if results are attached to this pointer from Stored Proceedure calls, the next standard query will die 2014
//only a problem with persistant connections
while(mysqli_more_results($this->connection->_connectionID)){
while (@mysqli_more_results($this->connection->_connectionID)) {
@mysqli_next_result($this->connection->_connectionID);
}

View file

@ -130,7 +130,7 @@ class ADORecordSet_mysqlt extends ADORecordSet_mysql{
class ADORecordSet_ext_mysqlt extends ADORecordSet_mysqlt {
function ADORecordSet_ext_mysqlt($queryID,$mode=false)
function __construct($queryID,$mode=false)
{
parent::__construct($queryID,$mode);
}

View file

@ -24,5 +24,7 @@ Added:
Our changes:
* Removed random seed initialization from lib/adodb/adodb.inc.php:216 (see 038f546 and MDL-41198).
* MDL-52286 fixed usage of /e in preg_replace, incorrect constructor in ADORecordSet_ext_mysqlt
and ADORecordSet_mysqli::_close(). Check if fixed upstream during the next upgrade and remove this line.
skodak, iarenaza, moodler, stronk7