Strict standards - only variables should be passed


#1

This is very new error to me and not sure what it means, but this is the code its referencing

$errors= array();
$target = "upload_files/";
$target = $target . basename( $_FILES['contract']['name']);

Error

Strict Standards:  Only variables should be passed by reference in upload_contract.php on line 861

line 861 is

$target = "upload_files/";

#2

Are you sure it's not in the next line? I wonder whether changing it to this might help:

$errors= array();
$target = "upload_files/";
$bn = basename( $_FILES['contract']['name']);
$target = $target . $bn;

I had a bit of a search and it's telling that virtually the entire first page of results covers how to disable the error message, rather than how to fix the code.


#3

i have only had this error very recently, so like you say if its a case of it cant be fixed but lets hide it sort of issue, I'll leave it for now as I thought it was causing me a problem, but think its a file size issue on uploading of one


#4

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.