submit.php
File submit.php
has 504 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php declare(strict_types=1);
/*
* You may not change or alter any portion of this comment or credits
* of supporting developers from this source code or any supporting source code
* which is considered copyrighted (c) material of the original comment or credit authors.
Consider simplifying this complex logical expression. Open
Open
if ($approveprivilege && 'edit' === $_GET['op']) {
$op = 'edit';
$storyid = Request::getInt('storyid', 0, 'GET');
} elseif ($approveprivilege && 'delete' === $_GET['op']) {
$op = 'delete';
Avoid deeply nested control flow statements. Open
Open
if (!unlink($currentPicture)) {
trigger_error('Error, impossible to delete the picture attached to this article');
}
Avoid deeply nested control flow statements. Open
Open
if (!$sfiles->store()) {
echo _AM_UPLOAD_DBERROR_SAVE;
}
Avoid deeply nested control flow statements. Open
Open
if (file_exists($newName)) {
@unlink($fullPictureName);
rename($newName, $fullPictureName);
}