Skip to content

Commit

Permalink
Fixed PHP 5.6 and 7.0 compatibility issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-milette committed Jun 19, 2024
1 parent 366cf53 commit 02446c1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Change Log
All notable changes to this project will be documented in this file.

## [3.1.3] - 2024-06-19 (dev)
### Update
- Fixed some compatibility issues with PHP 5.6 and 7.0.

## [3.1.2] - 2024-04-28
### Updated
- Fixed incorrect error message for invalid DMARC ruf.
Expand Down
5 changes: 3 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
}

$lastcroninterval = get_config('tool_task', 'lastcroninterval');
$expectedfrequency = $CFG->expectedcronfrequency ?? MINSECS;
$expectedfrequency = isset($CFG->expectedcronfrequency) ? $CFG->expectedcronfrequency : MINSECS;
$croninfrequent = !$cronoverdue && ($lastcroninterval > ($expectedfrequency + MINSECS)
|| $lastcron < time() - $expectedfrequency);
if ($croninfrequent) {
Expand Down Expand Up @@ -276,7 +276,8 @@

// Split the host and the port.
$host = explode(':', $host . ':25'); // Set default port to 25 in case none was specified.
[$host, $port] = $host;
$host = $host[0];
$port = $host[1];
$port = (int)$port;

// Check for DNS record lookup failure. Skip if host is an IP address.
Expand Down
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
defined('MOODLE_INTERNAL') || die();

$plugin->component = 'local_mailtest'; // To check on upgrade, that module sits in correct place.
$plugin->version = 2024042801; // The current module version (Date: YYYYMMDDXX).
$plugin->version = 2024061900; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2013040500; // Requires Moodle version 2.5.
$plugin->release = '3.1.2';
$plugin->release = '3.1.3';
$plugin->maturity = MATURITY_STABLE;
$plugin->cron = 0;

0 comments on commit 02446c1

Please sign in to comment.