Skip to content

Commit f4d316d

Browse files
Validate job amount
1 parent df09153 commit f4d316d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Cli/Executable/Pgdump.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,11 @@ public function usePort(int $port) : Pgdump
273273
* @param int $jobs
274274
* @return \phpbu\App\Cli\Executable\Pgdump
275275
*/
276-
public function dumpJobs(int $jobs) : Pgdump
276+
public function dumpJobs(int $jobs): Pgdump
277277
{
278+
if ($jobs < 0) {
279+
throw new Exception('invalid jobs value');
280+
}
278281
$this->jobs = $jobs;
279282
return $this;
280283
}

0 commit comments

Comments
 (0)