Update PageController.php

Fixed division by zero error.