ballhogjoni Posted January 16, 2012 Share Posted January 16, 2012 So i read the docs on this and it said to create a callback function and use ini_set to set the function. I am trying to serialize an array with the class inside the array $dd_normal_button = array ( 'dd_normal_button_display' => array ( 'dd_button_digg' => __PHP_Incomplete_Class::__set_state(array( '__PHP_Incomplete_Class_Name' => 'DD_Digg', 'buttonLayout' => array ( 'Wide' => 'DiggWide', 'Normal' => 'DiggMedium', 'Compact' => 'DiggCompact', 'Icon' => 'DiggIcon', ), ) ) ) ); So then I try serialize($dd_normal_button); and I get the error. Any ideas/suggestions. Thanks Link to comment https://forums.phpfreaks.com/topic/255156-call-to-undefined-method-__php_incomplete_class__set_state/ Share on other sites More sharing options...
ballhogjoni Posted January 16, 2012 Author Share Posted January 16, 2012 forgot to include my callback function ini_set('unserialize_callback_func', 'mycallback'); // set your callback_function function mycallback($classname) { // just include a file containing your classdefinition // you get $classname to figure out which classdefinition is required include_once '/plugins/digg-digg/include/dd-class.php'; } Link to comment https://forums.phpfreaks.com/topic/255156-call-to-undefined-method-__php_incomplete_class__set_state/#findComment-1308286 Share on other sites More sharing options...
ballhogjoni Posted January 16, 2012 Author Share Posted January 16, 2012 bump Link to comment https://forums.phpfreaks.com/topic/255156-call-to-undefined-method-__php_incomplete_class__set_state/#findComment-1308333 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.