PHP configuration should not be changed dynamically 2

  • Major
  • Bugrisk

More information: https://insight.sensiolabs.com/what-we-analyse/php.dynamically_change_configuration

in config/config.php, line 48
  1. break;
  2. }
  3. }
  4. }
  5. ini_set('display_errors', $this['debug']);

    Changing PHP configuration dynamically through ini_set() may create hard to debug errors.

    Time to fix: about 2 hours
    Open Issue Permalink
    Last edited by Chauncey McAskill
in www/index.php, line 19
  1. use Charcoal\App\AppConfig;
  2. use Charcoal\App\AppContainer;
  3. /** If we're not using PHP 5.6+, explicitly set the default character set. */
  4. if (PHP_VERSION_ID < 50600) {
  5. ini_set('default_charset', 'UTF-8');

    Changing PHP configuration dynamically through ini_set() may create hard to debug errors.

    Time to fix: about 2 hours
    Open Issue Permalink
    Last edited by Chauncey McAskill
  6. }
  7. /**
  8. * If you are using PHP's built-in server, return FALSE
  9. * for existing files on the filesystem.

Web applications should contain a favicon

  • Major
  • Performance

More information: https://insight.sensiolabs.com/what-we-analyse/web.missing_favicon

in www

No favicon found in the web root directory

Time to fix: about 1 hour
Open Issue Permalink
Collective
  • www
    • index.php

Web applications should contain a robots.txt file

  • Major
  • Performance

More information: https://insight.sensiolabs.com/what-we-analyse/web.missing_robots_txt

in www

The web root doesn't contain a robots.txt file. Search engines will ask for it, so not providing it will affect Search Engine ranking, and add load to the server needlessly.

Time to fix: about 1 hour
Open Issue Permalink
Collective
  • www
    • index.php

Unused method, property, variable or parameter 3

  • Minor
  • Deadcode

More information: https://insight.sensiolabs.com/what-we-analyse/php.unused_local_variable_or_private_member

  1. $snakeTargetName = self::snake($targetName);
  2. $studlyTargetName = self::studly($targetName);
  3. $sourceName = $this->sourceName();
  4. $snakeSourceName = self::snake($sourceName);
  5. $studlySourceName = self::studly($sourceName);
  6. $verbose = $this->verbose();

    This verbose local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Joel Alphonso
  7. $climate->out("\n".'Replacing file content...');
  8. $files = array_merge(
  9. $this->globRecursive('config/*'),
  10. $this->globRecursive('metadata/*'),
  1. $snakeSourceName = self::snake($sourceName);
  2. $studlySourceName = self::studly($sourceName);
  3. $targetName = $this->targetName();
  4. $snakeTargetName = self::snake($targetName);
  5. $studlyTargetName = self::studly($targetName);
  6. $verbose = $this->verbose();

    This verbose local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Joel Alphonso
  7. $climate->out("\n".'Renaming files and directories');
  8. $sourceFiles = $this->globRecursive('*'.$snakeSourceName.'*');
  9. $sourceFiles = array_reverse($sourceFiles);
  1. /**
  2. * The current error message.
  3. *
  4. * @var Translation|string|null
  5. */
  6. private $errorMessage;

    This errorMessage attribute is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Chauncey McAskill
  7. /**
  8. * @return string|TranslationString
  9. */
  10. public function pageTitle()

.htaccess should be avoided

  • Info
  • Performance

More information: https://insight.sensiolabs.com/what-we-analyse/web.apache_config

A .htaccess file has been spotted. You should consider moving it to the server configuration to improve global performances.

Time to fix: about 1 hour
Open Issue Permalink
Collective