mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 06:42:42 +01:00
Fix RuntimeException: min(): Array must contain at least one element
Summary: Make sure that `$epochs[]` is never empty but contains `0` so `min($epochs)` will not complain. Closes T15623 Test Plan: Carefully read the code (as I am unaware of reproduction steps). Reviewers: O1 Blessed Committers, avivey Reviewed By: O1 Blessed Committers, avivey Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Maniphest Tasks: T15623 Differential Revision: https://we.phorge.it/D25417
This commit is contained in:
parent
9b105c8e9e
commit
beec08e019
1 changed files with 4 additions and 0 deletions
|
@ -198,6 +198,10 @@ final class DiffusionBlameController extends DiffusionController {
|
||||||
$map[$identifier] = $data;
|
$map[$identifier] = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($epochs)) {
|
||||||
|
$epochs[] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
$epoch_min = min($epochs);
|
$epoch_min = min($epochs);
|
||||||
$epoch_max = max($epochs);
|
$epoch_max = max($epochs);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue