How do I solve unserialize() error?

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
balcass
User
Posts: 6

How do I solve unserialize() error?

Post 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


mobhar
User
Posts: 11702

Post 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.

balcass
User
Posts: 6

Post 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?


mobhar
User
Posts: 11702

Post by mobhar »

balcass wrote:
which field is wrong?

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


Post Reply