The conclusion of articles takes place on two pages, 1 - preview blocks, which is the transition to opred. article, and 2 - a specific article, which uses two arguments.
PHP:
function getNews ($limit, $id) { global $mysqli; connectDB(); if ($id) $where = "WHERE `id` = ".$id; $result = $mysqli -> query("SELECT * FROM `news` $where ORDER BY `id` DESC LIMIT $limit"); closeDB(); if (!$id) return resultToArray($result); else return $result->fetch_assoc(); } Both pages work, and the warning is on the one where only one argument is used.
Warning: Warning: Missing argument 2 for getNews (), called in W: \ domains \ dszorenka \ news.php on line 6 and defined in W: \ domains \ dszorenka \ functions \ functions.php on line 14
In fact, it seems to me that it checks to the function code, and that it does not check for the existence of an argument inside it does not care. There may really be a wrong code.