Skip to content

Commit 0a2c99f

Browse files
authored
Merge pull request #1373 from nextcloud/fix/1370
fix(Classifier): Check cores against int value
2 parents 9330c7f + 56522c3 commit 0a2c99f

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)