Global variable or function should never be used 3

More information: https://insight.symfony.com/what-we-analyse/php.use_global_variable_or_function

in programs/init.php, line 26
  1. * @copyright Copyright (c) 2006 by CANTICO ({@link http://www.cantico.fr})
  2. */
  3. function AuthBasic_onDeleteAddon()

    AuthBasic_onDeleteAddon() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by samzeb
  4. {
  5. require_once $GLOBALS['babInstallPath'] . 'utilit/functionalityincl.php';
  6. $oFunctionalities = new bab_functionalities();
in programs/init.php, line 38
  1. return true;
  2. }
  3. return false;
  4. }
  5. function AuthBasic_upgrade($sVersionBase, $sVersionIni)

    AuthBasic_upgrade() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by samzeb
  6. {
  7. require_once $GLOBALS['babInstallPath'] . 'utilit/functionalityincl.php';
  8. $oFunctionalities = new bab_functionalities();
in programs/init.php, line 50
  1. return true;
  2. }
  3. return false;
  4. }
  5. function AuthBasic_onPackageAddon()

    AuthBasic_onPackageAddon() adds to the global scope. Prefer class properties or methods to let other developers know what this relates to.

    Time to fix: about 1 day
    Open Issue Permalink
    Last edited by samzeb
  6. {
  7. AuthBasic_upgrade(0, 0);
  8. return true;
  9. }

exit() and die() functions should be avoided

More information: https://insight.symfony.com/what-we-analyse/php.use_exit_function

  1. return bab_translate("Basic authentication");
  2. }
  3. protected function systemExit($value = 0)
  4. {
  5. exit($value);

    This line stops the execution flow, without explanation. If this is for debug, you should remove it. If this is to deal with an error, use exceptions instead.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by laucho
  6. }
  7. public function authenticate()
  8. {
  9. header('WWW-Authenticate: Basic realm="' . $GLOBALS['babSiteName'] . '"');

PHP short tags should not be used

More information: https://insight.symfony.com/what-we-analyse/php.use_php_short_open_tag

  1. ; <?php/*

    PHP short tags (<?) may not be interpreted on every server, depending on the php configuration. Replace them by <?php.

    Time to fix: about 3 minutes
    Open Issue Permalink
    Last edited by samzeb
  2. [general]
  3. name="AuthBasic"
  4. version="0.2"
  5. encoding="UTF-8"
  6. mysql_character_set_database="latin1,utf8"

Text files should end with a valid new line character.

More information: https://insight.symfony.com/what-we-analyse/missing_e_o_l

in programs/addonini.php, line 16
  1. ov_version="6.6.91"
  2. php_version="4.1.2"
  3. addon_access_control=0
  4. author="samuel zebina ( samuel.zebina@cantico.fr )"
  5. icon="icon.png"
  6. ;*/?>

    This file ends with no newline character, or with a different newline character than other files in your project. It won't render properly on a terminal, and it's considered a bad practice.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by samzeb