Skip to content

Reference to super-global $_SERVER in functions.php #201

@matt-bernhardt

Description

@matt-bernhardt

There are five references to the super-global $_SERVER variable. This is being flagged in CodeClimate by the PHPMD tool, saying:

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.


Example: ::

  class Foo {
      public function bar() {
          $name = $_POST['foo'];
      }
  }

This is probably a good conversation to have with Hattie once she starts, as it may involve moving parts of the hours harvester on the server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions