Inquiries about the page number on the "pagination" board

Hello, I’d like to inquire.
I made a job board using ‘pagination’. You can see 10 posts on page 1 on the bulletin board.
(link. https://innovate.dy.co.kr/kr/recruiting)
There are no posts on this link yet.
But the page numbers of the bulletin board are ‘1’ and ‘0’.
Can I delete “0”? The client requested deletion because it looked like an error, is it possible?

I need help…!

		<?php $pagination = $list->pagination() ?>
			<nav class="numberset">
			  <ul>

			    <?php if ($pagination->hasPrevPage()): ?>
			    <li>
			      <a href="<?= $pagination->prevPageURL() ?>"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 6.84 9.17"><polygon points="0 4.58 6.84 0 6.84 9.17 0 4.58"/></svg></a>
			    </li>
			    <?php else: ?>
			    <li>
			      <span><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 6.84 9.17"><polygon points="0 4.58 6.84 0 6.84 9.17 0 4.58"/></svg></span>
			    </li>
			    <?php endif ?>

			    <?php foreach ($pagination->range(10) as $r): ?>
			    <li>
			      <a<?= $pagination->page() === $r ? ' aria-current="page"' : '' ?> href="<?= $pagination->pageURL($r) ?>">
			        <?= $r ?>
			      </a>
			    </li>
			    <?php endforeach ?>


			    <?php if ($pagination->hasNextPage()): ?>
			    <li>
			      <a href="<?= $pagination->nextPageURL() ?>"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 6.84 9.17"><polygon points="6.84 4.58 0 9.17 0 0 6.84 4.58"/></svg></a>
			    </li>
			    <?php else: ?>
			    <li>
			      <span><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 6.84 9.17"><polygon points="6.84 4.58 0 9.17 0 0 6.84 4.58"/></svg></span>
			    </li>
			    <?php endif ?>

			  </ul>
			</nav>

That is a bit strange, it should start with 1, not zero. But in general it would make sense to hide the pagination if there are no pages.

<?php if ($pagination->hasPages()): ?>
 <!-- Rest of pagination code -->
<?php endif ?>

Thank you! But when I modified the code like this, both ‘1’ and ‘0’ disappeared. What the client wants is that there should be a page number “1” even without any text.

				<?php if ($pagination->hasPages()): ?>
				    <?php foreach ($pagination->range(10) as $r): ?>
				    <li>
				      <a<?= $pagination->page() === $r ? ' aria-current="page"' : '' ?> href="<?= $pagination->pageURL($r) ?>">
				        <?= $r ?>
				      </a>
				    </li>
				    <?php endforeach ?>
				<?php endif ?>

So, I changed it back to the original one. In the original state, if there is no article, the number “0” appears in addition to the page number “1”, but when I post one article, “0” disappears and only “1” remains. (If you access the link now, I posted a test post. Then, “0” disappeared:)
Link. DY INNOVATE

The pagination range starts at one. If there are no pages, the second value passed to range ($end) is 0, so you end up with

$start = 1;
$end = 0;
dump(range($start, $end));
/* Array
(
    [0] => 1
    [1] => 0
) */

In my opinion, it doesn’t make sense to show a pagination at all when there are no pages to paginate. Or you have to cheat and just output $pagination->firstPage() + 1 if there are not pages.