RSS Feed/News AbstractJob::calculateOptimalBatch can return a non-nonsensical float

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
34,335
Points
823

Reputation:

The AbstractJob::calculateOptimalBatch function attempts to compute an optimal batch size of actions/queries for job to stay within the maxRunTime for jobs.

This is type hinted to return an int, but this can return float sometimes. This matters if the caller is using using this value and has declare(strict_types=1) defined in the file. The strict_flags feature prevents silent float => int conversion when calling a function.

Continue reading...
 
Status
Not open for further replies.
Top