Skip to content

Commit

Permalink
MDL-72359 core: Changed MAX_TIME from 9999999999 to PHP_INT_MAX
Browse files Browse the repository at this point in the history
This prevents automatic casting from int to double on 32 bit systems
(which have a maximum for integers of 2147483647)

Whilst Moodle will not support 32-bit systems for much longer, this is
still worth doing to prevent future issues.
  • Loading branch information
danowar2k authored and andrewnicols committed Aug 23, 2023
1 parent cccc009 commit 079a5fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion analytics/classes/analysable.php
Expand Up @@ -38,7 +38,7 @@ interface analysable {
/**
* Max timestamp.
*/
const MAX_TIME = 9999999999;
const MAX_TIME = PHP_INT_MAX;

/**
* The analysable unique identifier in the site.
Expand Down

0 comments on commit 079a5fa

Please sign in to comment.