Skip to content

Commit

Permalink
MDL-55864 general: fix PHP7.1 strict warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
marinaglancy authored and danpoltawski committed Sep 13, 2016
1 parent 0a7c6b8 commit 9135f63
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion backup/util/loggers/tests/logger_test.php
Expand Up @@ -95,7 +95,8 @@ function test_base_logger() {
$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);
Expand Down
2 changes: 1 addition & 1 deletion badges/index.php
Expand Up @@ -160,7 +160,7 @@
}
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) {
Expand Down
2 changes: 1 addition & 1 deletion badges/view.php
Expand Up @@ -83,7 +83,7 @@
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) {
Expand Down
2 changes: 1 addition & 1 deletion blocks/glossary_random/block_glossary_random.php
Expand Up @@ -86,7 +86,7 @@ function specialization() {
switch ($this->config->type) {

case BGR_RANDOMLY:
$i = rand(1,$numberofentries);
$i = ($numberofentries > 1) ? rand(1, $numberofentries) : 1;
$limitfrom = $i-1;
break;

Expand Down
2 changes: 1 addition & 1 deletion lib/tests/setuplib_test.php
Expand Up @@ -174,7 +174,7 @@ public function test_make_unique_directory_basedir_is_file() {
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.
Expand Down

0 comments on commit 9135f63

Please sign in to comment.