MDL-55864 general: fix PHP7.1 strict warnings

This commit is contained in:
Marina Glancy
2016-09-13 15:24:34 +01:00
committed by Dan Poltawski
parent 0a7c6b8a57
commit 9135f6347e
5 changed files with 6 additions and 5 deletions
+2 -1
View File
@@ -95,7 +95,8 @@ class backup_logger_testcase extends basic_testcase {
$lo3 = new mock_base_logger3(backup::LOG_ERROR);
$lo1->set_next($lo2);
$lo2->set_next($lo3);
$this->assertFalse($lo1->process('test', backup::LOG_ERROR));
$msg = 13;
$this->assertFalse($lo1->process($msg, backup::LOG_ERROR));
// Test checksum correct
$lo1 = new mock_base_logger1(backup::LOG_ERROR);
+1 -1
View File
@@ -160,7 +160,7 @@ if ($type == BADGE_TYPE_SITE) {
}
echo $OUTPUT->box('', 'notifyproblem hide', 'check_connection');
$totalcount = count(badges_get_badges($type, $courseid, '', '' , '', ''));
$totalcount = count(badges_get_badges($type, $courseid, '', '' , 0, 0));
$records = badges_get_badges($type, $courseid, $sortby, $sorthow, $page, BADGE_PERPAGE);
if ($totalcount) {
+1 -1
View File
@@ -83,7 +83,7 @@ $output = $PAGE->get_renderer('core', 'badges');
echo $output->header();
echo $OUTPUT->heading($title);
$totalcount = count(badges_get_badges($type, $courseid, '', '', '', '', $USER->id));
$totalcount = count(badges_get_badges($type, $courseid, '', '', 0, 0, $USER->id));
$records = badges_get_badges($type, $courseid, $sortby, $sorthow, $page, BADGE_PERPAGE, $USER->id);
if ($totalcount) {
@@ -86,7 +86,7 @@ class block_glossary_random extends block_base {
switch ($this->config->type) {
case BGR_RANDOMLY:
$i = rand(1,$numberofentries);
$i = ($numberofentries > 1) ? rand(1, $numberofentries) : 1;
$limitfrom = $i-1;
break;
+1 -1
View File
@@ -174,7 +174,7 @@ class core_setuplib_testcase extends advanced_testcase {
global $CFG;
// Start with a file instead of a directory.
$base = $CFG->tempdir . DIRECTORY_SEPARATOR . md5(microtime() + rand());
$base = $CFG->tempdir . DIRECTORY_SEPARATOR . md5(microtime(true) + rand());
touch($base);
// First the false test.