Jump to content

Call to undefined method __PHP_Incomplete_Class::__set_state()


ballhogjoni

Recommended Posts

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

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';
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.