I was getting a fatal error exception:
“Serialization of ‘SimpleXMLElement’ is not allowed”
/www/yii/framework-1.1.x/web/CController.php(0)
No source code available.
with the last few lines of the stack trace:
#0 /www/yii/framework/web/CController.php(0): serialize()
#1 /www/yii/framework/web/CController.php(327): CController->savePageStates(Array, ‘<!DOCTYPE html …’)
#2 /www/yii/web/CController.php(743): CController->processOutput(’<!DOCTYPE html …’)
environment: Apache/2.2.14 (Unix) PHP/5.3.2 Yii Framework/1.1.4
(seems the same in Yii 1.1.5-dev)
changing line 1153 in CController.php from:
$data=Yii::app()->getSecurityManager()->hashData(serialize($states));
to
$data=Yii::app()->getSecurityManager()->hashData(json_encode($states));
seems to fix the problem.
Anyone else seen this and/or have a different fix?