Conditional that makes no sense

Issue #659 resolved
Frank Joris created an issue

Backend file: liveupdate/classes/download.php Lines: 402 - 422

if (version_compare(JVERSION, '3.0', 'ge')) is checked again in the else branch

        if (version_compare(JVERSION, '3.0', 'ge'))
        {
            $ftp = JClientFTP::getInstance(
                    $ftpOptions['host'], $ftpOptions['port'], array(), $ftpOptions['user'], $ftpOptions['pass']
            );
        }
        else
        {
            if (version_compare(JVERSION, '3.0', 'ge'))
            {
                $ftp = JClientFTP::getInstance(
                        $ftpOptions['host'], $ftpOptions['port'], array(), $ftpOptions['user'], $ftpOptions['pass']
                );
            }
            else
            {
                $ftp = JFTP::getInstance(
                        $ftpOptions['host'], $ftpOptions['port'], array(), $ftpOptions['user'], $ftpOptions['pass']
                );
            }
        }

Comments (4)

  1. Emmanuel Lecoester repo owner

    Sorry but this code is in the liveupdate component. I don't touch on any code from this :)

    But thank you for your job !

    Manu

  2. Log in to comment