Skip to content

исправление ошибок #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Notnochka
Copy link
Contributor

No description provided.

* @return array
*/

function addLotForm(array $postData, array $fileData, mysqli $db, array $categories, int $userId): array
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

создать в папке functions файл forms.php либо forms-handle.php и перенести эту функцию туда

* @return string|null
*/

function processFileUpload(array $file, string $uploadDir): ?string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

создать в папке functions файл files.php и перенсти функцию туда

* @return array
*/

function authenticateUser(string $email, string $password, mysqli $db): array {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mysqli $db заменить на mysqli $link и сделать первым аргументом в функции

* @return int
*/

function isUserAuthenticated(mysqli $db): int {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

заменить тип на bool

} else {
$categoryId = (int)$_POST['category'];

$categoryExistsQuery = "SELECT id FROM categories WHERE id = ?";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

с 266 по 273 - можно вынести в отдельную функцию
function checkCategoryExeist(int $id): bool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants