HTML_Quickform unserialize insanity.
| From: | Ian P. Christian | Date: | Wed, 09 Jun 2004 12:08:38 +0000 |
| Subject: | HTML_Quickform unserialize insanity. | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-13034@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm having an issue passing a serialized array in HTML_QuickForm_Controller.
This error seems to be completely illogical, and I can't figure it out, so I
thought I would ask here for a little help.
On page1, I have this...
$bbnumber = $this->controller->exportValue('page0', 'bbnumber');
$result = $adsl_checker->CheckNumber($bbnumber);
$resultField = $this->createElement('hidden', 'result');
$resultField->setValue(serialize($result));
$this->addElement($resultField);
And on page8, I have this...
$values = $this->controller->exportValues();
$moo = unserialize($values['result']);
var_dump($moo) . " : end<hr />";
The output is false. If i var_dump($value['result']), this is what I get...
string(1337) "a:17:
{s:7:"ERRORID";s:1:"0";s:5:"INPUT";s:11:"REMOVED";s:9:"INPUTTYPE";s:5:"TELNO";s:9:"FIXEDRATE";s:1:"A";s:12:"RATEADAPTIVE";s:1:"A";s:10:"REASONCODE";s:1:"I";s:12:"EXCHANGECODE";s:5:"EAWDF";s:12:"EXCHANGENAME";s:15:"WOODHAM
FERRERS";s:9:"READYDATE";s:1:"
";s:9:"EXCHSTATE";s:1:"E";s:7:"TRIGGER";s:0:"";s:4:"RTPC";s:1:"Y";s:8:"POSTCODE";s:7:"REMOVED";s:12:"CAPACITYHOME";s:1:"
";s:14:"CAPACITYOFFICE";s:1:"
";s:12:"SUGGESTEDMSG";s:341:"Your exchange has ADSL broadband.
Our initial test on your line suggests that you may be able to have an ADSL
broadband service that provides up to 2Mbps download speed.
If you decide to place an order, a further test will be performed to confirm
if your line is suitable, and if so for what speed of service.
Thank you for your interest.";s:16:"SUPPLEMENTARYMSG";s:512:"Note: If you have
an ISDN or Home Highway service connected to this number and you wish to
purchase Broadband ADSL, this can be arranged through your Service Provider.
You will only be able to keep one of your ISDN / Home Highway telephone
numbers - generally you can choose any of your numbers but there are some
rare exceptions. If you have an existing Broadband ADSL service and wish to
change service providers then please contact both your new and existing
service provider to have this service transferred.";}"
Seems like a perfectly valid serialized string to me.
Any help would be much appreciated.
Kind Regards,
Ian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAxv3GEe6ncNCcEO0RAtjsAKCm+BLP+UyAh/Ht4bevw6V9UH2VXQCg49nj
1wVFIcnM1s3M4Nt22fGkuxQ=
=jJON
-----END PGP SIGNATURE-----