-1

I am assigning the object for class "PurchOrder" to session variable

$_SESSION['obj'] = new PurchOrder;

But it returns the error "__PHP_Incomplete_Class_Name" when i access the function which is inside the class "PurchOrder"

I didnt handle this type of error before.

Evert
  • 93,428
  • 18
  • 118
  • 189

1 Answers1

2

This happens if the PurchOrder class is not available when you are using the object stored in the session (or in any other case where a class instance is serialized and unserialized).

You need to ensure that whatever file defines that class is included whenever you want to use an instance of it.

ThiefMaster
  • 310,957
  • 84
  • 592
  • 636