Strict Standards: Only variables should be passed by reference

Strict Standards: Only variables should be passed by reference

If you have STRICT error reporting set on your server and running php 5.xx you will receive the following error
divider

If you have STRICT error reporting set on your server and running php 5.xx you will receive the following error;

Strict Standards: Only variables should be passed by reference in /your_root/.../includes/MXSearch/KT_MXSearcgConfig.class.php on line 122
In php 5.xx you are not allowed to change the return value of a function.

Basically you can't say foo() returned 'ABC' but we want to make it return 'XYZ'. That is exactly what is happening on line 122

However, if we say $protocol = foo() then we can manipulate $protocol in whatever way we want.

Change line 122 from

$protocol = strtolower(array_shift(explode('/', $_SERVER['SERVER_PROTOCOL'])));

to

$protocol = explode('/', $_SERVER['SERVER_PROTOCOL']);
$protocol = strtolower(array_shift($protocol));
Written by:  - 23 Sep, 2012