﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
18488,set_transient crashes when value parameter is a SimpleXMLElement object,bobbingwide,,"I have been developing a plugin that obtains information about high and low tides in the UK. The data is obtained from another site as a SimpleXMLElement. I found that when I passed a value to set_transient that had been assigned directly from the SimpleXMLObject then it was being received as an object and somewhere in the innards of the function the routine crashed. My workaround was to cast the assignment.
e.g. this failed

{{{
$title = $channel->item->title;
$store = '1';
$secs = bw_time_of_day_secs();
$secs = 86400 - $secs;
$set_transient( ""bw_tides_title_"" . $store, $title, $secs);

}}}

but change line 1 as below and it works

$title = '''(string)''' $channel->item->title;

Two questions therefore. 
1. Am I misinterpreting the documentation that says I don't need to serialise the value? What does mixed actually mean.
2. Does set_transient have to crash when the parameters are wrong?

The problem is completely reproducable. I now have a working solution so I don't need a fix right now. I just want to understand.
Herb 

",enhancement,reopened,normal,Awaiting Review,Cache,3.2.1,normal,,needs-patch,johnbillion@… mikeschinkel@… xoodrew@…
