Skip to content

Commit 2393fcb

Browse files
committed
fix: impostazione di max_rows a 0 per prevenzione divisione per 0
1 parent 32134c1 commit 2393fcb

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/Util/Autofill.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ public function getAdditionalNumber()
108108
$space = $this->space;
109109
$number = 0;
110110

111+
// Protezione contro divisione per zero
112+
if ($this->max_rows <= 0) {
113+
return 0;
114+
}
115+
111116
// Algoritmo per il calcolo delle pagine
112117
if ($space <= $this->max_rows) {
113118
// Prima pagina - calcolo diretto

0 commit comments

Comments
 (0)