private function validationAction() { //no id => redirect home if (array_key_exists('id', $_GET)) { $iId = intval($_GET['id']); $oProduct = ProductManager::get($iId); // product not found => redirect home if (null === $oProduct) { $this->homeAction(); return; } else { $aAllComments = CommentManager::getAllComments($oProduct); require ROOT . 'src/ecommerce/view/validation.php'; } } else { $aAllComments = CommentManager::getAllComments(); require ROOT . 'src/ecommerce/view/validation.php'; } }