note 108060 added to function.unserialize

From: Date: Mon, 26 Mar 2012 11:00:45 +0000
Subject: note 108060 added to function.unserialize
Groups: php.notes 
Request: Send a blank email to php-notes+get-186817@lists.php.net to get a copy of this message
I used Google-Oauth for authentication, got a "Person-Object" back and saved this in the database (serialized). After unserializing, i got the PHP_INCOMPLETE-Class, because the Person-Class was not included. To avoid this i converted the original-class to a PHP stdClass via Json: // Before: $me_data == Person() $me_data = json_encode($me_data); $me_data = json_decode($me_data); // After: $me_data == stdClass() ---- Server IP: 69.147.83.197 Probable Submitter: 188.195.156.36 ---- Manual Page -- http://www.php.net/manual/en/function.unserialize.php Edit -- https://master.php.net/note/edit/108060 Del: integrated -- https://master.php.net/note/delete/108060/integrated Del: useless -- https://master.php.net/note/delete/108060/useless Del: bad code -- https://master.php.net/note/delete/108060/bad+code Del: spam -- https://master.php.net/note/delete/108060/spam Del: non-english -- https://master.php.net/note/delete/108060/non-english Del: in docs -- https://master.php.net/note/delete/108060/in+docs Del: other reasons-- https://master.php.net/note/delete/108060 Reject -- https://master.php.net/note/reject/108060 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#186817) next »