Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

seamuswc's avatar

Call to a member function session() on null

public function success() {

  $paid = $this->request->session()->get('paid');
  if ($paid['paid'] == true ) {
    return redirect('payments/confirmed');
  }

.....

}

The below when called is returning:

"Call to a member function session() on null"

Do sessions always need to be set or not Null for you to reference them? And if so, is there a work around?

0 likes
2 replies

Please or to participate in this conversation.