Skip to content

Commit c78e34b

Browse files
authored
api (print): declare copies var earlier
1 parent f288cf7 commit c78e34b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api/print.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,9 @@
189189
// print image
190190
$status = 'ok';
191191
$linecount = 0;
192+
$copies = (int)$vars['copies'];
192193

193-
if ($vars['copies'] > 1) {
194+
if ($copies > 1)
194195
$cmd = sprintf(
195196
$config['commands']['print'],
196197
$vars['copies'],
@@ -237,7 +238,6 @@
237238
}
238239

239240
if ($status === 'ok') {
240-
$copies = (int)$vars['copies'];
241241
if ($copies > 1) {
242242
for ($i = 1; $i <= $copies; $i++) {
243243
$printManager->addToPrintDb($vars['fileName'], $vars['uniqueName'] . '-' . $i);

0 commit comments

Comments
 (0)