Skip to content

Commit ca073a5

Browse files
marcelklehrbackportbot[bot]
authored andcommitted
fix(Classifier): Check cores against int value
fixes #1370 Signed-off-by: Marcel Klehr <[email protected]>
1 parent 3fca3b2 commit ca073a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Classifiers/Classifier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ public function classifyFiles(string $model, array $queueFiles, int $timeout): \
194194
try {
195195
$proc->start();
196196

197-
if ($cores !== '0') {
197+
if ((int)$cores !== 0) {
198198
@exec('taskset -cp ' . implode(',', range(0, (int)$cores, 1)) . ' ' . ((string)$proc->getPid()));
199199
}
200200

0 commit comments

Comments
 (0)