This repository was archived by the owner on Jul 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 240
This repository was archived by the owner on Jul 28, 2024. It is now read-only.
Support serialized arrays inside serialized arrays #1234
Copy link
Copy link
Closed
Labels
improvementImprovement of an existing functionality. See "feature" for new features.Improvement of an existing functionality. See "feature" for new features.noteworthySignificant issue or PR, to be highlighted in release notesSignificant issue or PR, to be highlighted in release notesscope: coreCore VersionPress functionality like tracking actions, creating Git commits, etc.Core VersionPress functionality like tracking actions, creating Git commits, etc.
Milestone
Description
Plugin developers can use maybe_serialize() function for serialized (partly) data and serialized string will be serialized again.
Related problems:
- Wrong display of these data.
- Null bytes problems Handle null bytes for serialized objects #1224
- Definition of entities is not possible.
Example from WooCommerce: B05847D36D6248E2A76B4847462F0528.zip
[B05847D36D6248E2A76B4847462F0528]
session_key = "a3807f15df7875f0e1cf17deb140e6b5"
session_value = <<<serialized>>> <array>
session_value["cart"] = "a:1:{s:32:\"a5bfc9e07964f8dddeb95fc584cd965d\";a:9:{s:10:\"product_id\";i:37;s:12:\"variation_id\";i:0;s:9:\"variation\";a:0:{}s:8:\"quantity\";i:1;s:10:\"line_total\";d:99;s:13:\"line_subtotal\";d:99;s:8:\"line_tax\";d:0;s:17:\"line_subtotal_tax\";d:0;s:13:\"line_tax_data\";a:2:{s:5:\"total\";a:0:{}s:8:\"subtotal\";a:0:{}}}}"
session_value["applied_coupons"] = "a:0:{}"
session_value["coupon_discount_amounts"] = "a:0:{}"
session_value["coupon_discount_tax_amounts"] = "a:0:{}"
session_value["removed_cart_contents"] = "a:0:{}"
session_value["cart_contents_total"] = 99
session_value["total"] = 199
session_value["subtotal"] = 99
session_value["subtotal_ex_tax"] = 99
session_value["tax_total"] = 0
session_value["taxes"] = "a:0:{}"
session_value["shipping_taxes"] = "a:0:{}"
session_value["discount_cart"] = 0
session_value["discount_cart_tax"] = 0
session_value["shipping_total"] = 100
session_value["shipping_tax_total"] = 0
session_value["fee_total"] = 0
session_value["fees"] = "a:0:{}"
session_value["customer"] = "a:24:{s:8:\"postcode\";s:0:\"\";s:4:\"city\";s:0:\"\";s:9:\"address_1\";s:0:\"\";s:7:\"address\";s:0:\"\";s:9:\"address_2\";s:0:\"\";s:5:\"state\";s:0:\"\";s:7:\"country\";s:2:\"CZ\";s:17:\"shipping_postcode\";s:0:\"\";s:13:\"shipping_city\";s:0:\"\";s:18:\"shipping_address_1\";s:0:\"\";s:16:\"shipping_address\";s:0:\"\";s:18:\"shipping_address_2\";s:0:\"\";s:14:\"shipping_state\";s:0:\"\";s:16:\"shipping_country\";s:2:\"CZ\";s:13:\"is_vat_exempt\";b:0;s:19:\"calculated_shipping\";b:0;s:10:\"first_name\";s:0:\"\";s:9:\"last_name\";s:0:\"\";s:7:\"company\";s:0:\"\";s:5:\"phone\";s:0:\"\";s:5:\"email\";s:0:\"\";s:19:\"shipping_first_name\";s:0:\"\";s:18:\"shipping_last_name\";s:0:\"\";s:16:\"shipping_company\";s:0:\"\";}"
session_value["shipping_for_package_0"] = "a:2:{s:12:\"package_hash\";s:40:\"wc_ship_cfe00310e69096c3bde394205e46df0c\";s:5:\"rates\";a:3:{s:11:\"flat_rate:1\";O:16:\"WC_Shipping_Rate\":6:{s:2:\"id\";s:11:\"flat_rate:1\";s:5:\"label\";s:9:\"Flat rate\";s:4:\"cost\";s:6:\"100.00\";s:5:\"taxes\";a:0:{}s:9:\"method_id\";s:9:\"flat_rate\";s:27:\"Metadata
Metadata
Assignees
Labels
improvementImprovement of an existing functionality. See "feature" for new features.Improvement of an existing functionality. See "feature" for new features.noteworthySignificant issue or PR, to be highlighted in release notesSignificant issue or PR, to be highlighted in release notesscope: coreCore VersionPress functionality like tracking actions, creating Git commits, etc.Core VersionPress functionality like tracking actions, creating Git commits, etc.