• Resolved sirol81

    (@sirol81)


    Is there any chance that this plugin could call maybe_unserialize() in some specific fields? (I imagine a checkbox to activate this feature and a textbox to specify the column field)

    I get the ugly serialized array and I can’t get it in any readable form.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Eli

    (@scheeeli)

    I have considered that before, but the problem becomes: How would you format the array output from the unserialize function?

    Thread Starter sirol81

    (@sirol81)

    I need only an item of the array for my personal purposes. Is there a hook or something that I can use to customize your plugin for my needs? Could you provide a minimal example in order to learn where to hook my custom code? thanks

    Thread Starter sirol81

    (@sirol81)

    found this commented code in your source, it hinted me where to edit and obtain my specific item:

    $report .= ‘<td>’.($value).'</td>’;//is_array(maybe_unserialize($value))?print_r(maybe_unserialize($value),1):

    It shows that you were already working on something along the idea of using ‘maybe_unserialize’, thanks a lot!

    Plugin Author Eli

    (@scheeeli)

    Yes, I was, but as I said, what format should an array be output in? The print_r function is not much better than the serialized values.

    If you only need one value from the serialized array then I think you could use an SQL solution for your issue. You should look into the SQL Functions mid and substring_index. I have used those functions to isolate a single values in a serialized array without PHP, using only an SQL query.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘unserialize’ is closed to new replies.