Merge branch 'MDL-76413-master' of https://github.com/raortegar/moodle
This commit is contained in:
@@ -86,7 +86,7 @@ class store implements \tool_log\log\store, \core\log\sql_reader {
|
||||
}
|
||||
|
||||
// Replace crud fields.
|
||||
$selectwhere = preg_replace_callback("/(crud).*?(<>|=|!=).*?'(.*?)'/s", 'self::replace_crud', $selectwhere);
|
||||
$selectwhere = preg_replace_callback("/(crud).*?(<>|=|!=).*?'(.*?)'/s", self::class .'::replace_crud', $selectwhere);
|
||||
|
||||
return array($selectwhere, $params, $sort);
|
||||
}
|
||||
|
||||
+1
-1
@@ -4768,7 +4768,7 @@ class admin_setting_sitesettext extends admin_setting_configtext {
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct() {
|
||||
call_user_func_array(['parent', '__construct'], func_get_args());
|
||||
call_user_func_array([parent::class, '__construct'], func_get_args());
|
||||
$this->set_force_ltr(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@ class ADODB_pdo extends ADOConnection {
|
||||
return call_user_func_array(array($this->_driver, 'Concat'), $args);
|
||||
}
|
||||
|
||||
return call_user_func_array('parent::Concat', $args);
|
||||
return call_user_func_array(parent::class . '::Concat', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -254,7 +254,7 @@ class ADODB_pdo extends ADOConnection {
|
||||
}
|
||||
|
||||
// No driver specific method defined, use mysql format '?'
|
||||
return call_user_func_array('parent::param', $args);
|
||||
return call_user_func_array(parent::class . '::param', $args);
|
||||
}
|
||||
|
||||
// returns true or false
|
||||
|
||||
@@ -23,3 +23,7 @@ Removed:
|
||||
Added:
|
||||
* index.html - prevent directory browsing on misconfigured servers
|
||||
* readme_moodle.txt - this file ;-)
|
||||
|
||||
Notes:
|
||||
* 2023-02-10 Applied patch https://github.com/ADOdb/ADOdb/pull/928 to avoid PHP 8.2 deprecations.
|
||||
See MDL-76413 for more details.
|
||||
@@ -557,7 +557,7 @@ class EvalMathFuncs {
|
||||
|
||||
static function average() {
|
||||
$args = func_get_args();
|
||||
return (call_user_func_array(array('self', 'sum'), $args) / count($args));
|
||||
return (call_user_func_array(array(self::class, 'sum'), $args) / count($args));
|
||||
}
|
||||
|
||||
static function max() {
|
||||
|
||||
@@ -29,3 +29,7 @@ Changes by Stefan Erlachner, Thomas Niedermaier (MDL-64414):
|
||||
e.g. if (or(condition_1, condition_2, ... condition_n))
|
||||
* add function and:
|
||||
e.g. if (and(condition_1, condition_2, ... condition_n))
|
||||
|
||||
Changes by Raquel Ortega (MDL-76413)
|
||||
* Avoid PHP 8.2: Partially-supported callable deprecations
|
||||
* eg: call_user_func_array(array('self', 'sum'), $args to call_user_func_array(array(self::class, 'sum'), $args)
|
||||
@@ -124,7 +124,7 @@ class JS extends Minify
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
call_user_func_array(array('parent', '__construct'), func_get_args());
|
||||
call_user_func_array(array('\\MatthiasMullie\Minify\\Minify', '__construct'), func_get_args());
|
||||
|
||||
$dataDir = __DIR__.'/../data/js/';
|
||||
$options = FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES;
|
||||
|
||||
@@ -20,3 +20,9 @@ MDL-68191: https://github.com/matthiasmullie/minify/issues/317 is a bug that sto
|
||||
a few seconds. This is one of the reasons Behat runs in the browser are so slow.)
|
||||
Whenever this library is updated check if the fix is included and remove this note.
|
||||
NOTE: As of 2020/12/08, only the first commit was brought into Moodle
|
||||
|
||||
Note:
|
||||
* 2023-02-10 Apply commit https://github.com/matthiasmullie/minify/commit/aa8010c2fa3c26f018874141d36025085754abff
|
||||
to avoid PHP 8.2 deprecations. See MDL-76413 for more details.
|
||||
Since new version already have this fix if someone executing the upgrading version and
|
||||
it has already the patch please ignore this note.
|
||||
|
||||
@@ -2650,7 +2650,7 @@ class externallib_test extends externallib_advanced_testcase {
|
||||
|
||||
// Confirm the data is correct.
|
||||
$contacts = $result;
|
||||
usort($contacts, ['static', 'sort_contacts_id']);
|
||||
usort($contacts, [static::class, 'sort_contacts_id']);
|
||||
$this->assertCount(3, $contacts);
|
||||
|
||||
$contact1 = array_shift($contacts);
|
||||
@@ -2715,7 +2715,7 @@ class externallib_test extends externallib_advanced_testcase {
|
||||
|
||||
// Confirm the data is correct.
|
||||
$contacts = $result;
|
||||
usort($contacts, ['static', 'sort_contacts_id']);
|
||||
usort($contacts, [static::class, 'sort_contacts_id']);
|
||||
$this->assertCount(3, $contacts);
|
||||
|
||||
$contact1 = array_shift($contacts);
|
||||
|
||||
@@ -550,7 +550,7 @@ class provider_test extends \core_privacy\tests\provider_testcase {
|
||||
$writer = writer::with_context($user1context);
|
||||
|
||||
$contacts = (array) $writer->get_data([get_string('contacts', 'core_message')]);
|
||||
usort($contacts, ['static', 'sort_contacts']);
|
||||
usort($contacts, [static::class, 'sort_contacts']);
|
||||
|
||||
$this->assertCount(3, $contacts);
|
||||
|
||||
@@ -706,7 +706,7 @@ class provider_test extends \core_privacy\tests\provider_testcase {
|
||||
$dbm2 = $DB->get_record('messages', ['id' => $m2]);
|
||||
$dbm3 = $DB->get_record('messages', ['id' => $m3]);
|
||||
|
||||
usort($messages, ['static', 'sort_messages']);
|
||||
usort($messages, [static::class, 'sort_messages']);
|
||||
$m1 = array_shift($messages);
|
||||
$m2 = array_shift($messages);
|
||||
$m3 = array_shift($messages);
|
||||
@@ -736,7 +736,7 @@ class provider_test extends \core_privacy\tests\provider_testcase {
|
||||
$dbm5 = $DB->get_record('messages', ['id' => $m5]);
|
||||
$dbm6 = $DB->get_record('messages', ['id' => $m6]);
|
||||
|
||||
usort($messages, ['static', 'sort_messages']);
|
||||
usort($messages, [static::class, 'sort_messages']);
|
||||
$m4 = array_shift($messages);
|
||||
$m5 = array_shift($messages);
|
||||
$m6 = array_shift($messages);
|
||||
@@ -1740,7 +1740,7 @@ class provider_test extends \core_privacy\tests\provider_testcase {
|
||||
]);
|
||||
$this->assertCount(3, $messages);
|
||||
|
||||
usort($messages, ['static', 'sort_messages']);
|
||||
usort($messages, [static::class, 'sort_messages']);
|
||||
$m1 = array_shift($messages);
|
||||
$m2 = array_shift($messages);
|
||||
$m3 = array_shift($messages);
|
||||
@@ -1810,7 +1810,7 @@ class provider_test extends \core_privacy\tests\provider_testcase {
|
||||
]);
|
||||
$this->assertCount(3, $messages);
|
||||
|
||||
usort($messages, ['static', 'sort_messages']);
|
||||
usort($messages, [static::class, 'sort_messages']);
|
||||
$m1 = array_shift($messages);
|
||||
$m2 = array_shift($messages);
|
||||
$m3 = array_shift($messages);
|
||||
|
||||
@@ -392,7 +392,7 @@ class core_tag_collection {
|
||||
}
|
||||
|
||||
self::$cloudsortfield = $sort;
|
||||
usort($tagsincloud, "self::cloud_sort");
|
||||
usort($tagsincloud, self::class . "::cloud_sort");
|
||||
|
||||
return new core_tag\output\tagcloud($tagsincloud, $tagscount, $fromctx, $ctx, $rec);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user