mambax7/publisher

View on GitHub

Showing 3,032 of 3,032 total issues

Remove error control operator '@' on line 985.
Open

    protected function processImageAndWriteToCache($localImage)
    {
        $sData    = getimagesize($localImage);
        $origType = $sData[2];
        $mimeType = $sData['mime'];
Severity: Minor
Found in thumb.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

Remove error control operator '@' on line 1377.
Open

    protected function getIP()
    {
        $rem = @$_SERVER['REMOTE_ADDR'];
        $ff  = @$_SERVER['HTTP_X_FORWARDED_FOR'];
        $ci  = @$_SERVER['HTTP_CLIENT_IP'];
Severity: Minor
Found in thumb.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

Remove error control operator '@' on line 1535.
Open

    protected function getURL($url, $tempfile)
    {
        $this->lastURLError = false;
        $url                = preg_replace('/ /', '%20', $url);
        if (function_exists('curl_init')) {
Severity: Minor
Found in thumb.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

The method publisher_editItem has a boolean flag argument $clone, which is a certain sign of a Single Responsibility Principle violation.
Open

function publisher_editItem($showmenu = false, $itemId = 0, $clone = false): void
Severity: Minor
Found in admin/item.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

Missing class import via use statement (line '176', column '19').
Open

    $catEle = new \XoopsFormLabel(_MB_PUBLISHER_SELECTCAT, Utility::createCategorySelect($options[1], 0, true, 'options[1]'));
Severity: Minor
Found in blocks/items_columns.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '64', column '29').
Open

            $criteria = new \CriteriaCompo();
Severity: Minor
Found in blocks/items_new.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '196', column '21').
Open

    $catEle   = new \XoopsFormLabel(_MB_PUBLISHER_SELECTCAT, Utility::createCategorySelect($options[0], 0, true, 'options[0]'));
Severity: Minor
Found in blocks/items_new.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '213', column '21').
Open

    $imageEle = new \XoopsFormSelect(_MB_PUBLISHER_IMAGE_TO_DISPLAY, 'options[5]', $options[5]);
Severity: Minor
Found in blocks/items_new.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '65', column '29').
Open

            $criteria = new \CriteriaCompo();
Severity: Minor
Found in blocks/items_recent.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '198', column '21').
Open

    $countEle = new \XoopsFormText(_MB_PUBLISHER_LAST_ITEMS_COUNT, 'options[1]', 2, 255, $options[1]);
Severity: Minor
Found in blocks/items_spot.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '93', column '41').
Open

                        $fileInfo = new \SplFileInfo($templateFolder . $v);
Severity: Minor
Found in include/onupdate.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '59', column '29').
Open

    $uploader         = new \XoopsMediaUploader(Utility::getUploadDir(true, 'content') . '/', $allowedMimeTypes, $maxFileSize, $maxImageWidth, $maxImageHeight);
Severity: Minor
Found in admin/pw_upload_file.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Remove error control operator '@' on line 305.
Open

    public function __construct()
    {
        global $allowedSites;
        $this->startTime = microtime(true);
        date_default_timezone_set('UTC');
Severity: Minor
Found in thumb.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

Remove error control operator '@' on line 408.
Open

    public function __destruct()
    {
        foreach ($this->toDeletes as $del) {
            $this->debug(2, "Deleting temp file $del");
            @unlink($del);
Severity: Minor
Found in thumb.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

Remove error control operator '@' on line 970.
Open

    protected function processImageAndWriteToCache($localImage)
    {
        $sData    = getimagesize($localImage);
        $origType = $sData[2];
        $mimeType = $sData['mime'];
Severity: Minor
Found in thumb.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

Remove error control operator '@' on line 960.
Open

    protected function processImageAndWriteToCache($localImage)
    {
        $sData    = getimagesize($localImage);
        $origType = $sData[2];
        $mimeType = $sData['mime'];
Severity: Minor
Found in thumb.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

Remove error control operator '@' on line 986.
Open

    protected function processImageAndWriteToCache($localImage)
    {
        $sData    = getimagesize($localImage);
        $origType = $sData[2];
        $mimeType = $sData['mime'];
Severity: Minor
Found in thumb.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

Remove error control operator '@' on line 978.
Open

    protected function processImageAndWriteToCache($localImage)
    {
        $sData    = getimagesize($localImage);
        $origType = $sData[2];
        $mimeType = $sData['mime'];
Severity: Minor
Found in thumb.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

Remove error control operator '@' on line 999.
Open

    protected function calcDocRoot()
    {
        $docRoot = @$_SERVER['DOCUMENT_ROOT'];
        if (defined('LOCAL_FILE_BASE_DIRECTORY')) {
            $docRoot = LOCAL_FILE_BASE_DIRECTORY;
Severity: Minor
Found in thumb.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

Remove error control operator '@' on line 1262.
Open

    protected function serveCacheFile()
    {
        $this->debug(3, "Serving {$this->cachefile}");
        if (!is_file($this->cachefile)) {
            $this->error("serveCacheFile called in timthumb but we couldn't find the cached file.");
Severity: Minor
Found in thumb.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

Severity
Category
Status
Source
Language