Page 1 of 1

How do I solve unserialize() error?

Posted: Mon Oct 23, 2017 8:01 pm
by balcass

How do I solve it?

Notice: unserialize(): Error at offset 0 of 1 bytes in
C:\campo\htdocs\prueba\phpfn14.php on Line ## ...
.the code is ....
//Load profile frío string
Function LoadProfile ($Profile) {
$ar = unserialize(strval ($Profile));
if (is_array($ar))
$this->Profile = array_merge($this->Profile, $ar);

work tools:
Windows 10
PHPMaker 2018.0.3
Xampp


Re: How do I solve unserialize() error?

Posted: Mon Oct 23, 2017 8:33 pm
by mobhar
  1. Make sure you have already defined "Profile" field from "Advanced Security" -> "User Login Options" -> "User Table Fields" -> "Profile field (memo)" of your PHPMaker project.
  2. Make sure the initial state of this "Profile" field is null or blank string, and if not, just make it so.

Re: How do I solve unserialize() error?

Posted: Mon Oct 23, 2017 10:21 pm
by balcass

All fields are defined.:
"Advanced user profile" -> "User logon options" -> "User table fields" ->
"Email field" == varchar field (255)
"Activated" == field int (11)
"Profile field (memo)" == int field (11)

which field is wrong?


Re: How do I solve unserialize() error?

Posted: Tue Oct 24, 2017 10:54 am
by mobhar

balcass wrote:
which field is wrong?

The "Profile" field should be "text" or "memo" type, and not numeric or int.