I just installed xampp, to run some old program (created 2 or more years ago) and I’m getting 3 errors I can’t figure out.
- Strict Standards: Only variables should be passed by reference in C:\xampp\htdocs\2010\web\core\route\route.php on line 117
public function loadClass($address,$ext='') {
$this->extname = preg_replace('/_/','/',$address,3);
line:117> $this->classname = end(explode('_',$address)).($e= $ext!='' ? '('.$ext.')' : '');
include_once(ROOT_ROUTE.'/'.$this->extname.'.php');
$this->newclass = new $this->classname;
return $this->newclass;
}
the line 117 i can’t understand, it is not using passed by reference, why there is a error?
Because end() expects an argument passed by reference, you can’t use it with a non-variable such as the direct result of another function call or construct.
Quoting from the argument definition in the manual:
Change
to