IET-OU / cloudengine

CloudEngine is an easy way to create a social web site for discussing & aggregating ideas & resources. It is ideal for running events & fostering discussion. It is the free, open source software that powers Cloudworks —
https://cloudworks.ac.uk
GNU General Public License v2.0
3 stars 0 forks source link

Remove / reduce PHP warnings in CodeIgniter log files #369

Open nfreear opened 6 years ago

nfreear commented 6 years ago

...

1. Undefined index: HTTP_HOST ... -- command-line calls!

ERROR - 2017-12-04 10:41:21 --> Severity: Notice  --> Undefined index: HTTP_HOST ... /cloudworks/system/application/config/config.php 15

system/application/config.php:

$__dir = str_replace('\\', '/', dirname($_SERVER[ 'SCRIPT_NAME' ]));
$config[ 'base_url' ] = 'http://' . filter_input( INPUT_SERVER, 'HTTP_HOST' ) . $__dir;
if ('/' !== $__dir) {
  $config['base_url'] .= '/';
}

2. 8192 --> Methods with the same name as their class ...

ERROR - 2017-11-30 16:39:53 --> Severity: 8192  --> Methods with the same name as their class will not be constructors in a future version of PHP; CI_User_agent has a deprecated constructor ... /cloudworks/system/libraries/User_agent.php 29

....