0

I am swapping to PHP7.1 but now I'm getting error in this function and have no idea why?

failed to open stream: No such file or directory in line 82 - bellow is the line 82:

$data=file($filename);

and

Undefined offset: 1 on line 87

Undefined offset: 2 on line 87

Undefined offset: 3 on line 87

Here is line 87:

list($type,$var1,$var2,$ref) = explode(":",$data[0]);

And here is rest of the code on that same function:

function load_profile($id,$delete=false)
{
    global $SESSION_FOLDER;
    $filename=$SESSION_FOLDER.'/'.$id;

    ob_start(); 
    $data=file($filename);
    ob_end_clean();

    $result=array();
    list($type,$var1,$var2,$ref) = explode(":",$data[0]);

Can someone please help me to fix this ? Thank you so much in advance!

Farer
  • 25
  • 1
  • 5
  • 1
    The first one basically says that the file cannot be loaded.This could have numerous causes, like the parth being defined incorrectly, the file not being there, or the process not having access. The other errors are collateral damage. – GolezTrol Aug 06 '18 at 11:58
  • @GolezTrol thanks for reply, I know now a little more... I see on my settings, everything is ok, I have set to varialble $SESSION_FOLDER correct folder and file and folder is write-ready (775) so I still don't understand where is a problem? ? – Farer Aug 06 '18 at 12:04

0 Answers0