Closed (fixed)
Project:
Services
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
24 Jan 2009 at 19:40 UTC
Updated:
29 May 2009 at 23:48 UTC
Im working on a flash service connector and i have found one issue in the return values of system.connect.
The original function
function system_service_connect() {
global $user;
$return = new stdClass();
$return->sessid = session_id();
$return->user = $user;
return $return ;
}
NULL return values on $user object, thrown an "empty reference error" on my flash lib.
for ex.: timezone is NULL
a workaround to solve this:
function system_service_connect() {
global $user;
$user_returned = new stdClass();
foreach ($user as $index => $item){
if ($item!=NULL){
$user_returned -> $index = $item;
}else {
$user_returned -> $index = "";
}
}
$return = new stdClass();
$return->sessid = session_id();
$return->user = $user_returned;
return $return ;
}
Any other trick to solve this issue?
Comments
Comment #1
snelson commentedI've never seen this issue ... can you provide a test Flash file to replicate?
Comment #2
snelson commentedPostponed due to lack of info.
Comment #3
marcingy commentedClosed due to lack of response